@wavezfm/api 0.1.9 → 0.3.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/CHANGELOG.md +31 -0
- package/README.md +34 -431
- package/dist/index.d.ts +217 -31
- package/dist/index.js.map +1 -1
- package/dist/realtime/roomBot.js +50 -0
- package/dist/realtime/roomBot.js.map +1 -1
- package/dist/resources/billing.d.ts +80 -1
- package/dist/resources/billing.js +32 -0
- package/dist/resources/billing.js.map +1 -1
- package/dist/resources/chat.d.ts +3 -1
- package/dist/resources/chat.js +19 -0
- package/dist/resources/chat.js.map +1 -1
- package/dist/resources/friend.d.ts +1 -12
- package/dist/resources/friend.js +3 -18
- package/dist/resources/friend.js.map +1 -1
- package/dist/resources/playlist.d.ts +33 -8
- package/dist/resources/playlist.js +29 -3
- package/dist/resources/playlist.js.map +1 -1
- package/dist/resources/room.d.ts +32 -3
- package/dist/resources/room.js +53 -6
- package/dist/resources/room.js.map +1 -1
- package/dist/resources/roomBot.d.ts +8 -3
- package/dist/resources/roomBot.js +7 -2
- package/dist/resources/roomBot.js.map +1 -1
- package/dist/resources/settings.d.ts +52 -2
- package/dist/resources/settings.js +32 -0
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/shop.d.ts +5 -0
- package/dist/resources/shop.js +3 -0
- package/dist/resources/shop.js.map +1 -1
- package/dist/resources/source.d.ts +6 -6
- package/dist/resources/source.js +6 -3
- package/dist/resources/source.js.map +1 -1
- package/dist/resources/system.d.ts +3 -1
- package/dist/resources/system.js +6 -0
- package/dist/resources/system.js.map +1 -1
- package/dist/types.d.ts +210 -3
- package/package.json +4 -2
|
@@ -1,45 +1,124 @@
|
|
|
1
1
|
import type { ApiLike, CheckoutSessionResponse } from "../types.js";
|
|
2
2
|
export declare function createBillingResource(api: ApiLike): {
|
|
3
|
+
getCheckoutSessionStatus(sessionId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
4
|
+
sessionId: string;
|
|
5
|
+
status: string | null;
|
|
6
|
+
paymentStatus: string | null;
|
|
7
|
+
kind: string | null;
|
|
8
|
+
cycle: "monthly" | "annual" | null;
|
|
9
|
+
}>>;
|
|
10
|
+
cancelSubscription(): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
11
|
+
resumeSubscription(): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
12
|
+
upgradeSubscription(input?: {
|
|
13
|
+
locale?: string | null;
|
|
14
|
+
}): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
15
|
+
listSubscriptionPaymentHistory(): Promise<import("../types.js").ApiSuccessResponse<unknown[]>>;
|
|
3
16
|
createSubscriptionCheckout(input?: {
|
|
4
17
|
cycle?: string | null;
|
|
5
18
|
currency?: string | null;
|
|
19
|
+
locale?: string | null;
|
|
6
20
|
returnPath?: string | null;
|
|
21
|
+
uiMode?: string | null;
|
|
22
|
+
provider?: string | null;
|
|
7
23
|
}): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionResponse>>;
|
|
8
24
|
createDiamondCheckout(input?: {
|
|
9
25
|
quantity?: number;
|
|
10
26
|
currency?: string | null;
|
|
27
|
+
locale?: string | null;
|
|
28
|
+
returnPath?: string | null;
|
|
29
|
+
uiMode?: string | null;
|
|
30
|
+
provider?: string | null;
|
|
31
|
+
}): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionResponse>>;
|
|
32
|
+
createMiscShopCheckout(input: {
|
|
33
|
+
itemId: string;
|
|
34
|
+
roomSlug?: string | null;
|
|
35
|
+
username?: string | null;
|
|
36
|
+
displayUsername?: string | null;
|
|
37
|
+
locale?: string | null;
|
|
11
38
|
returnPath?: string | null;
|
|
39
|
+
uiMode?: string | null;
|
|
40
|
+
provider?: string | null;
|
|
12
41
|
}): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionResponse>>;
|
|
13
42
|
createRoomDonationCheckout(roomId: string, input?: {
|
|
14
43
|
amountCents?: number;
|
|
44
|
+
currency?: string | null;
|
|
15
45
|
locale?: string | null;
|
|
16
46
|
returnPath?: string | null;
|
|
47
|
+
uiMode?: string | null;
|
|
48
|
+
provider?: string | null;
|
|
17
49
|
}): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionResponse>>;
|
|
18
50
|
createGlobalDonationCheckout(input?: {
|
|
19
51
|
amountCents?: number;
|
|
52
|
+
currency?: string | null;
|
|
20
53
|
locale?: string | null;
|
|
21
54
|
returnPath?: string | null;
|
|
55
|
+
uiMode?: string | null;
|
|
56
|
+
provider?: string | null;
|
|
22
57
|
}): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionResponse>>;
|
|
23
58
|
createDiamondGiftCheckout(input: {
|
|
24
59
|
recipientUsername: string;
|
|
25
60
|
quantity?: number;
|
|
26
61
|
currency?: string | null;
|
|
62
|
+
locale?: string | null;
|
|
27
63
|
returnPath?: string | null;
|
|
28
64
|
message?: string | null;
|
|
29
65
|
anonymous?: boolean;
|
|
30
66
|
announceInRoom?: boolean;
|
|
31
67
|
announceRoomSlug?: string | null;
|
|
68
|
+
uiMode?: string | null;
|
|
32
69
|
}): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionResponse>>;
|
|
33
70
|
createSubscriptionGiftCheckout(input: {
|
|
34
|
-
recipientUsername
|
|
71
|
+
recipientUsername?: string | null;
|
|
72
|
+
recipientUserId?: string | null;
|
|
35
73
|
cycle?: string | null;
|
|
36
74
|
currency?: string | null;
|
|
75
|
+
locale?: string | null;
|
|
37
76
|
returnPath?: string | null;
|
|
38
77
|
message?: string | null;
|
|
39
78
|
anonymous?: boolean;
|
|
40
79
|
announceInRoom?: boolean;
|
|
41
80
|
announceRoomSlug?: string | null;
|
|
81
|
+
uiMode?: string | null;
|
|
82
|
+
provider?: string | null;
|
|
42
83
|
}): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionResponse>>;
|
|
84
|
+
createSubscriptionRoomGiftCheckout(input: {
|
|
85
|
+
roomSlug: string;
|
|
86
|
+
count?: number;
|
|
87
|
+
currency?: string | null;
|
|
88
|
+
locale?: string | null;
|
|
89
|
+
returnPath?: string | null;
|
|
90
|
+
message?: string | null;
|
|
91
|
+
anonymous?: boolean;
|
|
92
|
+
announceInRoom?: boolean;
|
|
93
|
+
uiMode?: string | null;
|
|
94
|
+
}): Promise<import("../types.js").ApiSuccessResponse<CheckoutSessionResponse>>;
|
|
95
|
+
createMercadoPagoPayment(input: {
|
|
96
|
+
kind: string;
|
|
97
|
+
cycle?: string | null;
|
|
98
|
+
quantity?: number;
|
|
99
|
+
amountCents?: number;
|
|
100
|
+
itemId?: string | null;
|
|
101
|
+
roomSlug?: string | null;
|
|
102
|
+
username?: string | null;
|
|
103
|
+
displayUsername?: string | null;
|
|
104
|
+
roomId?: string | null;
|
|
105
|
+
recipientUserId?: string | null;
|
|
106
|
+
currency?: string | null;
|
|
107
|
+
locale?: string | null;
|
|
108
|
+
returnPath?: string | null;
|
|
109
|
+
message?: string | null;
|
|
110
|
+
anonymous?: boolean;
|
|
111
|
+
announceInRoom?: boolean;
|
|
112
|
+
announceRoomSlug?: string | null;
|
|
113
|
+
formData?: Record<string, unknown> | null;
|
|
114
|
+
}): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
115
|
+
getMercadoPagoPaymentStatus(paymentId: string): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
116
|
+
createMercadoPagoSubscription(input?: {
|
|
117
|
+
cycle?: string | null;
|
|
118
|
+
locale?: string | null;
|
|
119
|
+
returnPath?: string | null;
|
|
120
|
+
formData?: Record<string, unknown> | null;
|
|
121
|
+
}): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
43
122
|
listPendingGifts(): Promise<import("../types.js").ApiSuccessResponse<unknown[]>>;
|
|
44
123
|
markGiftSeen(giftId: string): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
45
124
|
};
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
export function createBillingResource(api) {
|
|
2
2
|
return {
|
|
3
|
+
getCheckoutSessionStatus(sessionId) {
|
|
4
|
+
return api.get("/billing/checkout/session-status", {
|
|
5
|
+
query: { sessionId },
|
|
6
|
+
});
|
|
7
|
+
},
|
|
8
|
+
cancelSubscription() {
|
|
9
|
+
return api.post("/billing/subscription/cancel", {});
|
|
10
|
+
},
|
|
11
|
+
resumeSubscription() {
|
|
12
|
+
return api.post("/billing/subscription/resume", {});
|
|
13
|
+
},
|
|
14
|
+
upgradeSubscription(input) {
|
|
15
|
+
return api.post("/billing/subscription/upgrade", input ?? {});
|
|
16
|
+
},
|
|
17
|
+
listSubscriptionPaymentHistory() {
|
|
18
|
+
return api.get("/billing/subscription/payment-history");
|
|
19
|
+
},
|
|
3
20
|
createSubscriptionCheckout(input) {
|
|
4
21
|
return api.post("/billing/checkout/subscription", input ?? {});
|
|
5
22
|
},
|
|
6
23
|
createDiamondCheckout(input) {
|
|
7
24
|
return api.post("/billing/checkout/diamonds", input ?? {});
|
|
8
25
|
},
|
|
26
|
+
createMiscShopCheckout(input) {
|
|
27
|
+
return api.post("/billing/checkout/store/misc", input);
|
|
28
|
+
},
|
|
9
29
|
createRoomDonationCheckout(roomId, input) {
|
|
10
30
|
return api.post(`/billing/checkout/rooms/${encodeURIComponent(roomId)}/donation`, input ?? {});
|
|
11
31
|
},
|
|
@@ -18,6 +38,18 @@ export function createBillingResource(api) {
|
|
|
18
38
|
createSubscriptionGiftCheckout(input) {
|
|
19
39
|
return api.post("/billing/checkout/subscription/gift", input);
|
|
20
40
|
},
|
|
41
|
+
createSubscriptionRoomGiftCheckout(input) {
|
|
42
|
+
return api.post("/billing/checkout/subscription/gift-room", input);
|
|
43
|
+
},
|
|
44
|
+
createMercadoPagoPayment(input) {
|
|
45
|
+
return api.post("/billing/mercadopago/payment", input);
|
|
46
|
+
},
|
|
47
|
+
getMercadoPagoPaymentStatus(paymentId) {
|
|
48
|
+
return api.get(`/billing/mercadopago/payment/${encodeURIComponent(paymentId)}/status`);
|
|
49
|
+
},
|
|
50
|
+
createMercadoPagoSubscription(input) {
|
|
51
|
+
return api.post("/billing/mercadopago/subscription", input ?? {});
|
|
52
|
+
},
|
|
21
53
|
listPendingGifts() {
|
|
22
54
|
return api.get("/billing/gifts/pending");
|
|
23
55
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/resources/billing.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAC9C,OAAO;QACH,0BAA0B,CAAC,
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/resources/billing.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,GAAY;IAC9C,OAAO;QACH,wBAAwB,CAAC,SAAiB;YACtC,OAAO,GAAG,CAAC,GAAG,CAMX,kCAAkC,EAAE;gBACnC,KAAK,EAAE,EAAE,SAAS,EAAE;aACvB,CAAC,CAAC;QACP,CAAC;QAED,kBAAkB;YACd,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,EAAE,CACL,CAAC;QACN,CAAC;QAED,kBAAkB;YACd,OAAO,GAAG,CAAC,IAAI,CACX,8BAA8B,EAC9B,EAAE,CACL,CAAC;QACN,CAAC;QAED,mBAAmB,CAAC,KAAkC;YAClD,OAAO,GAAG,CAAC,IAAI,CACX,+BAA+B,EAC/B,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,8BAA8B;YAC1B,OAAO,GAAG,CAAC,GAAG,CACV,uCAAuC,CAC1C,CAAC;QACN,CAAC;QAED,0BAA0B,CAAC,KAO1B;YACG,OAAO,GAAG,CAAC,IAAI,CACX,gCAAgC,EAChC,KAAK,IAAI,EAAE,CACd,CAAC;QACN,CAAC;QAED,qBAAqB,CAAC,KAOrB;YACG,OAAO,GAAG,CAAC,IAAI,CACX,4BAA4B,EAC5B,KAAK,IAAI,EAAE,CACd,CAAC;Q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CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/resources/chat.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { ApiLike, ChatMessage } from "../types.js";
|
|
1
|
+
import type { ApiLike, ChatImageUploadResponse, ChatMediaPreviewResponse, ChatMessage } from "../types.js";
|
|
2
2
|
export declare function createChatResource(api: ApiLike): {
|
|
3
|
+
previewMedia(url: string): Promise<import("../types.js").ApiSuccessResponse<ChatMediaPreviewResponse>>;
|
|
4
|
+
uploadImage(image: Blob | FormData, fileName?: string): Promise<import("../types.js").ApiSuccessResponse<ChatImageUploadResponse>>;
|
|
3
5
|
getMessages(roomId: string, offset?: number, limit?: number): Promise<import("../types.js").ApiSuccessResponse<{
|
|
4
6
|
history: boolean;
|
|
5
7
|
pinnedMessage?: Record<string, unknown> | null;
|
package/dist/resources/chat.js
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
function isFormDataInput(value) {
|
|
2
|
+
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
3
|
+
}
|
|
1
4
|
export function createChatResource(api) {
|
|
2
5
|
return {
|
|
6
|
+
previewMedia(url) {
|
|
7
|
+
return api.get("/chat-media/preview", {
|
|
8
|
+
query: { url },
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
uploadImage(image, fileName) {
|
|
12
|
+
if (isFormDataInput(image)) {
|
|
13
|
+
return api.post("/chat-uploads", image);
|
|
14
|
+
}
|
|
15
|
+
if (typeof FormData === "undefined") {
|
|
16
|
+
throw new Error("FormData is unavailable. Provide a runtime with native FormData support.");
|
|
17
|
+
}
|
|
18
|
+
const formData = new FormData();
|
|
19
|
+
formData.append("image", image, fileName ?? "upload");
|
|
20
|
+
return api.post("/chat-uploads", formData);
|
|
21
|
+
},
|
|
3
22
|
getMessages(roomId, offset = 0, limit = 50) {
|
|
4
23
|
return api.get(`/rooms/${encodeURIComponent(roomId)}/messages`, {
|
|
5
24
|
query: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/resources/chat.ts"],"names":[],"mappings":"AAOA,SAAS,eAAe,CAAC,KAAc;IACnC,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,KAAK,YAAY,QAAQ,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC3C,OAAO;QACH,YAAY,CAAC,GAAW;YACpB,OAAO,GAAG,CAAC,GAAG,CAA2B,qBAAqB,EAAE;gBAC5D,KAAK,EAAE,EAAE,GAAG,EAAE;aACjB,CAAC,CAAC;QACP,CAAC;QAED,WAAW,CAAC,KAAsB,EAAE,QAAiB;YACjD,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,OAAO,GAAG,CAAC,IAAI,CACX,eAAe,EACf,KAAK,CACR,CAAC;YACN,CAAC;YAED,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;gBAClC,MAAM,IAAI,KAAK,CACX,0EAA0E,CAC7E,CAAC;YACN,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;YAChC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,IAAI,QAAQ,CAAC,CAAC;YACtD,OAAO,GAAG,CAAC,IAAI,CACX,eAAe,EACf,QAAQ,CACX,CAAC;QACN,CAAC;QAED,WAAW,CAAC,MAAc,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE;YAC9C,OAAO,GAAG,CAAC,GAAG,CAIX,UAAU,kBAAkB,CAAC,MAAM,CAAC,WAAW,EAAE;gBAChD,KAAK,EAAE;oBACH,MAAM;oBACN,KAAK;iBACR;aACJ,CAAC,CAAC;QACP,CAAC;QAED,iBAAiB,CAAC,IAAY,EAAE,MAAM,GAAG,CAAC,EA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.js";
|
|
2
2
|
export declare function createFriendResource(api: ApiLike): {
|
|
3
|
-
list(): Promise<import("../types.js").ApiSuccessResponse<UserProfile[]>>;
|
|
4
|
-
pending(): Promise<import("../types.js").ApiSuccessResponse<UserProfile[]>>;
|
|
5
|
-
sendRequest(userId: string): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
6
|
-
acceptRequest(requestId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
7
|
-
success: true;
|
|
8
|
-
}>>;
|
|
9
|
-
rejectRequest(requestId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
10
|
-
success: true;
|
|
11
|
-
}>>;
|
|
12
|
-
remove(friendshipId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
13
|
-
success: true;
|
|
14
|
-
}>>;
|
|
15
3
|
follow(userId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
16
4
|
success: true;
|
|
17
5
|
}>>;
|
|
@@ -20,4 +8,5 @@ export declare function createFriendResource(api: ApiLike): {
|
|
|
20
8
|
}>>;
|
|
21
9
|
followers(): Promise<import("../types.js").ApiSuccessResponse<UserProfile[]>>;
|
|
22
10
|
following(): Promise<import("../types.js").ApiSuccessResponse<UserProfile[]>>;
|
|
11
|
+
superfans(): Promise<import("../types.js").ApiSuccessResponse<UserProfile[]>>;
|
|
23
12
|
};
|
package/dist/resources/friend.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
export function createFriendResource(api) {
|
|
2
2
|
return {
|
|
3
|
-
list() {
|
|
4
|
-
return api.get("/friends");
|
|
5
|
-
},
|
|
6
|
-
pending() {
|
|
7
|
-
return api.get("/friends/pending");
|
|
8
|
-
},
|
|
9
|
-
sendRequest(userId) {
|
|
10
|
-
return api.post(`/friends/request/${encodeURIComponent(userId)}`, {});
|
|
11
|
-
},
|
|
12
|
-
acceptRequest(requestId) {
|
|
13
|
-
return api.post(`/friends/accept/${encodeURIComponent(requestId)}`, {});
|
|
14
|
-
},
|
|
15
|
-
rejectRequest(requestId) {
|
|
16
|
-
return api.post(`/friends/reject/${encodeURIComponent(requestId)}`, {});
|
|
17
|
-
},
|
|
18
|
-
remove(friendshipId) {
|
|
19
|
-
return api.delete(`/friends/${encodeURIComponent(friendshipId)}`);
|
|
20
|
-
},
|
|
21
3
|
follow(userId) {
|
|
22
4
|
return api.post(`/fans/${encodeURIComponent(userId)}`, {});
|
|
23
5
|
},
|
|
@@ -30,6 +12,9 @@ export function createFriendResource(api) {
|
|
|
30
12
|
following() {
|
|
31
13
|
return api.get("/fans/following");
|
|
32
14
|
},
|
|
15
|
+
superfans() {
|
|
16
|
+
return api.get("/superfans");
|
|
17
|
+
},
|
|
33
18
|
};
|
|
34
19
|
}
|
|
35
20
|
//# sourceMappingURL=friend.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"friend.js","sourceRoot":"","sources":["../../src/resources/friend.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC7C,OAAO;QACH,
|
|
1
|
+
{"version":3,"file":"friend.js","sourceRoot":"","sources":["../../src/resources/friend.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,GAAY;IAC7C,OAAO;QACH,MAAM,CAAC,MAAc;YACjB,OAAO,GAAG,CAAC,IAAI,CACX,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,EACrC,EAAE,CACL,CAAC;QACN,CAAC;QAED,QAAQ,CAAC,MAAc;YACnB,OAAO,GAAG,CAAC,MAAM,CACb,SAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,CACxC,CAAC;QACN,CAAC;QAED,SAAS;YACL,OAAO,GAAG,CAAC,GAAG,CAAgB,iBAAiB,CAAC,CAAC;QACrD,CAAC;QAED,SAAS;YACL,OAAO,GAAG,CAAC,GAAG,CAAgB,iBAAiB,CAAC,CAAC;QACrD,CAAC;QAED,SAAS;YACL,OAAO,GAAG,CAAC,GAAG,CAAgB,YAAY,CAAC,CAAC;QAChD,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import type { ApiLike,
|
|
1
|
+
import type { ApiLike, MediaSearchResponse, PlaylistJsonExport, PlaylistJsonImportResult, PlaylistSummary, PlaylistTrack, PlaylistTrackAvailabilityInput, PlaylistTrackAvailabilityResult, PlaylistTrackSearchResult } from "../types.js";
|
|
2
2
|
export declare function createPlaylistResource(api: ApiLike): {
|
|
3
3
|
list(): Promise<import("../types.js").ApiSuccessResponse<PlaylistSummary[]>>;
|
|
4
|
+
searchTracks(query: string, limit?: number): Promise<import("../types.js").ApiSuccessResponse<PlaylistTrackSearchResult[]>>;
|
|
4
5
|
create(input: {
|
|
5
6
|
name: string;
|
|
6
7
|
} | string): Promise<import("../types.js").ApiSuccessResponse<PlaylistSummary>>;
|
|
7
8
|
update(playlistId: string, input: {
|
|
8
9
|
name?: string;
|
|
9
10
|
isActive?: boolean;
|
|
10
|
-
}): Promise<import("../types.js").ApiSuccessResponse<
|
|
11
|
-
|
|
12
|
-
}>>;
|
|
11
|
+
}): Promise<import("../types.js").ApiSuccessResponse<PlaylistSummary>>;
|
|
12
|
+
reorder(playlistIds: string[]): Promise<import("../types.js").ApiSuccessResponse<PlaylistSummary[]>>;
|
|
13
13
|
remove(playlistId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
14
14
|
success: true;
|
|
15
15
|
}>>;
|
|
16
|
-
getTracks(playlistId: string
|
|
16
|
+
getTracks(playlistId: string, options?: {
|
|
17
|
+
roomId?: string | null;
|
|
18
|
+
recentWindowMinutes?: number | null;
|
|
19
|
+
}): Promise<import("../types.js").ApiSuccessResponse<PlaylistTrack[]>>;
|
|
20
|
+
exportJson(playlistId: string): Promise<import("../types.js").ApiSuccessResponse<PlaylistJsonExport>>;
|
|
21
|
+
checkTrackAvailability(items: PlaylistTrackAvailabilityInput[]): Promise<import("../types.js").ApiSuccessResponse<PlaylistTrackAvailabilityResult[]>>;
|
|
17
22
|
previewUrl(url: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
18
23
|
kind: "track";
|
|
19
24
|
sourceId: string;
|
|
@@ -21,6 +26,7 @@ export declare function createPlaylistResource(api: ApiLike): {
|
|
|
21
26
|
title: string;
|
|
22
27
|
artist?: string;
|
|
23
28
|
thumbnailUrl?: string | null;
|
|
29
|
+
isLive?: boolean;
|
|
24
30
|
} | {
|
|
25
31
|
kind: "playlist";
|
|
26
32
|
importSource: string;
|
|
@@ -28,6 +34,8 @@ export declare function createPlaylistResource(api: ApiLike): {
|
|
|
28
34
|
title: string;
|
|
29
35
|
totalTracks: number;
|
|
30
36
|
thumbnailUrl?: string | null;
|
|
37
|
+
totalDurationMs?: number | null;
|
|
38
|
+
tracks?: PlaylistTrack[];
|
|
31
39
|
truncated?: boolean;
|
|
32
40
|
}>>;
|
|
33
41
|
addTrack(playlistId: string, input: {
|
|
@@ -36,12 +44,25 @@ export declare function createPlaylistResource(api: ApiLike): {
|
|
|
36
44
|
source?: string;
|
|
37
45
|
title?: string;
|
|
38
46
|
artist?: string;
|
|
39
|
-
durationMs?: number;
|
|
47
|
+
durationMs?: number | null;
|
|
40
48
|
thumbnailUrl?: string | null;
|
|
41
|
-
|
|
49
|
+
isLive?: boolean | null;
|
|
50
|
+
clipStartMs?: number | null;
|
|
51
|
+
clipEndMs?: number | null;
|
|
52
|
+
insertAtTop?: boolean;
|
|
53
|
+
}): Promise<import("../types.js").ApiSuccessResponse<{
|
|
54
|
+
track: PlaylistTrack;
|
|
55
|
+
progression: Record<string, unknown> | null;
|
|
56
|
+
}>>;
|
|
42
57
|
reorderTracks(playlistId: string, trackIds: string[]): Promise<import("../types.js").ApiSuccessResponse<{
|
|
43
58
|
success: true;
|
|
44
59
|
}>>;
|
|
60
|
+
updateTrackClip(playlistId: string, trackId: string, input: {
|
|
61
|
+
clipStartMs?: number | null;
|
|
62
|
+
clipEndMs?: number | null;
|
|
63
|
+
}): Promise<import("../types.js").ApiSuccessResponse<{
|
|
64
|
+
track: PlaylistTrack;
|
|
65
|
+
}>>;
|
|
45
66
|
removeTrack(playlistId: string, trackId: string): Promise<import("../types.js").ApiSuccessResponse<{
|
|
46
67
|
success: true;
|
|
47
68
|
}>>;
|
|
@@ -59,6 +80,10 @@ export declare function createPlaylistResource(api: ApiLike): {
|
|
|
59
80
|
playlistId: string;
|
|
60
81
|
url: string;
|
|
61
82
|
}): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
83
|
+
importJson(input: {
|
|
84
|
+
playlistId?: string | null;
|
|
85
|
+
data: unknown;
|
|
86
|
+
}): Promise<import("../types.js").ApiSuccessResponse<PlaylistJsonImportResult>>;
|
|
62
87
|
cancelImport(jobId: string): Promise<import("../types.js").ApiSuccessResponse<Record<string, unknown>>>;
|
|
63
|
-
searchPreview(query: string, source?: string, limit?: number): Promise<import("../types.js").ApiSuccessResponse<
|
|
88
|
+
searchPreview(query: string, source?: string, limit?: number, pageToken?: string | null): Promise<import("../types.js").ApiSuccessResponse<MediaSearchResponse>>;
|
|
64
89
|
};
|
|
@@ -3,17 +3,36 @@ export function createPlaylistResource(api) {
|
|
|
3
3
|
list() {
|
|
4
4
|
return api.get("/playlists");
|
|
5
5
|
},
|
|
6
|
+
searchTracks(query, limit = 30) {
|
|
7
|
+
return api.get("/playlists/tracks/search", { query: { q: query, limit } });
|
|
8
|
+
},
|
|
6
9
|
create(input) {
|
|
7
10
|
return api.post("/playlists", typeof input === "string" ? { name: input } : input);
|
|
8
11
|
},
|
|
9
12
|
update(playlistId, input) {
|
|
10
13
|
return api.put(`/playlists/${encodeURIComponent(playlistId)}`, input);
|
|
11
14
|
},
|
|
15
|
+
reorder(playlistIds) {
|
|
16
|
+
return api.put("/playlists/reorder", {
|
|
17
|
+
playlistIds,
|
|
18
|
+
});
|
|
19
|
+
},
|
|
12
20
|
remove(playlistId) {
|
|
13
21
|
return api.delete(`/playlists/${encodeURIComponent(playlistId)}`);
|
|
14
22
|
},
|
|
15
|
-
getTracks(playlistId) {
|
|
16
|
-
return api.get(`/playlists/${encodeURIComponent(playlistId)}/tracks
|
|
23
|
+
getTracks(playlistId, options) {
|
|
24
|
+
return api.get(`/playlists/${encodeURIComponent(playlistId)}/tracks`, {
|
|
25
|
+
query: {
|
|
26
|
+
roomId: options?.roomId ?? undefined,
|
|
27
|
+
recentWindowMinutes: options?.recentWindowMinutes ?? undefined,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
exportJson(playlistId) {
|
|
32
|
+
return api.get(`/playlists/${encodeURIComponent(playlistId)}/export`);
|
|
33
|
+
},
|
|
34
|
+
checkTrackAvailability(items) {
|
|
35
|
+
return api.post("/playlists/tracks/availability", { items });
|
|
17
36
|
},
|
|
18
37
|
previewUrl(url) {
|
|
19
38
|
return api.get("/playlists/preview", {
|
|
@@ -26,6 +45,9 @@ export function createPlaylistResource(api) {
|
|
|
26
45
|
reorderTracks(playlistId, trackIds) {
|
|
27
46
|
return api.put(`/playlists/${encodeURIComponent(playlistId)}/tracks/reorder`, { trackIds });
|
|
28
47
|
},
|
|
48
|
+
updateTrackClip(playlistId, trackId, input) {
|
|
49
|
+
return api.put(`/playlists/${encodeURIComponent(playlistId)}/tracks/${encodeURIComponent(trackId)}/clip`, input);
|
|
50
|
+
},
|
|
29
51
|
removeTrack(playlistId, trackId) {
|
|
30
52
|
return api.delete(`/playlists/${encodeURIComponent(playlistId)}/tracks/${encodeURIComponent(trackId)}`);
|
|
31
53
|
},
|
|
@@ -44,15 +66,19 @@ export function createPlaylistResource(api) {
|
|
|
44
66
|
importSoundCloudPlaylist(input) {
|
|
45
67
|
return api.post("/playlists/imports/soundcloud", input);
|
|
46
68
|
},
|
|
69
|
+
importJson(input) {
|
|
70
|
+
return api.post("/playlists/imports/json", input);
|
|
71
|
+
},
|
|
47
72
|
cancelImport(jobId) {
|
|
48
73
|
return api.post(`/playlists/imports/${encodeURIComponent(jobId)}/cancel`, {});
|
|
49
74
|
},
|
|
50
|
-
searchPreview(query, source = "youtube", limit = 8) {
|
|
75
|
+
searchPreview(query, source = "youtube", limit = 8, pageToken) {
|
|
51
76
|
return api.get("/media/search", {
|
|
52
77
|
query: {
|
|
53
78
|
q: query,
|
|
54
79
|
source,
|
|
55
80
|
limit,
|
|
81
|
+
pageToken: pageToken ?? undefined,
|
|
56
82
|
},
|
|
57
83
|
});
|
|
58
84
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playlist.js","sourceRoot":"","sources":["../../src/resources/playlist.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playlist.js","sourceRoot":"","sources":["../../src/resources/playlist.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,sBAAsB,CAAC,GAAY;IAC/C,OAAO;QACH,IAAI;YACA,OAAO,GAAG,CAAC,GAAG,CAAoB,YAAY,CAAC,CAAC;QACpD,CAAC;QAED,YAAY,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE;YAClC,OAAO,GAAG,CAAC,GAAG,CACV,0BAA0B,EAC1B,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CACjC,CAAC;QACN,CAAC;QAED,MAAM,CAAC,KAAgC;YACnC,OAAO,GAAG,CAAC,IAAI,CACX,YAAY,EACZ,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CACtD,CAAC;QACN,CAAC;QAED,MAAM,CACF,UAAkB,EAClB,KAGC;YAED,OAAO,GAAG,CAAC,GAAG,CACV,cAAc,kBAAkB,CAAC,UAAU,CAAC,EAAE,EAC9C,KAAK,CACR,CAAC;QACN,CAAC;QAED,OAAO,CAAC,WAAqB;YACzB,OAAO,GAAG,CAAC,GAAG,CAAoB,oBAAoB,EAAE;gBACpD,WAAW;aACd,CAAC,CAAC;QACP,CAAC;QAED,MAAM,CAAC,UAAkB;YACrB,OAAO,GA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@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiLike, ApiSuccessResponse, RoomBotPermission, RoomQueueSnapshot, RoomQueueStatusResponse, RoomBotToken, RoomSummary } from "../types.js";
|
|
1
|
+
import type { ApiLike, ApiSuccessResponse, RoomBotPermission, RoomExternalMediaMetadataResponse, RoomExternalMediaValidationResponse, RoomPlaybackHistoryEntry, RoomQueueSnapshot, RoomQueueStatusResponse, RoomBotToken, RoomSummary } from "../types.js";
|
|
2
2
|
export declare function createRoomResource(api: ApiLike): {
|
|
3
3
|
list(): Promise<ApiSuccessResponse<RoomSummary[]>>;
|
|
4
4
|
featured(): Promise<{
|
|
@@ -6,9 +6,24 @@ export declare function createRoomResource(api: ApiLike): {
|
|
|
6
6
|
status: number;
|
|
7
7
|
headers: Headers;
|
|
8
8
|
}>;
|
|
9
|
-
getBySlug(slug: string): Promise<
|
|
9
|
+
getBySlug(slug: string): Promise<{
|
|
10
|
+
data: RoomSummary;
|
|
11
|
+
status: number;
|
|
12
|
+
headers: Headers;
|
|
13
|
+
}>;
|
|
10
14
|
getJoinPreview(slug: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
11
15
|
getWaitlist(slug: string): Promise<ApiSuccessResponse<RoomQueueStatusResponse>>;
|
|
16
|
+
getExternalMediaMetadata(url: string): Promise<ApiSuccessResponse<RoomExternalMediaMetadataResponse>>;
|
|
17
|
+
validateExternalMedia(url: string): Promise<ApiSuccessResponse<RoomExternalMediaValidationResponse>>;
|
|
18
|
+
getGoogleDriveSubtitle(input: {
|
|
19
|
+
id?: string;
|
|
20
|
+
url?: string;
|
|
21
|
+
format?: "srt" | "vtt";
|
|
22
|
+
}): Promise<ApiSuccessResponse<string>>;
|
|
23
|
+
getGoogleDriveStreamUrl(input: {
|
|
24
|
+
id?: string;
|
|
25
|
+
url?: string;
|
|
26
|
+
}): string;
|
|
12
27
|
getQueueStatus(slug: string, options?: {
|
|
13
28
|
viewerUserId?: string | null;
|
|
14
29
|
viewerPublicId?: number | null;
|
|
@@ -22,9 +37,17 @@ export declare function createRoomResource(api: ApiLike): {
|
|
|
22
37
|
isPrivate?: boolean;
|
|
23
38
|
}): Promise<ApiSuccessResponse<RoomSummary>>;
|
|
24
39
|
join(roomIdOrSlug: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
40
|
+
leave(roomId: string): Promise<ApiSuccessResponse<void>>;
|
|
25
41
|
favorite(roomId: string): Promise<ApiSuccessResponse<void>>;
|
|
26
42
|
unfavorite(roomId: string): Promise<ApiSuccessResponse<void>>;
|
|
27
43
|
getManagement(roomId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
44
|
+
getPlaybackHistory(roomId: string, limit?: number): Promise<ApiSuccessResponse<{
|
|
45
|
+
history: RoomPlaybackHistoryEntry[];
|
|
46
|
+
}>>;
|
|
47
|
+
delete(roomId: string): Promise<ApiSuccessResponse<{
|
|
48
|
+
success: true;
|
|
49
|
+
room: Record<string, unknown>;
|
|
50
|
+
}>>;
|
|
28
51
|
createBotToken(roomId: string, input: {
|
|
29
52
|
botName: string;
|
|
30
53
|
botAvatarUrl?: string;
|
|
@@ -33,9 +56,10 @@ export declare function createRoomResource(api: ApiLike): {
|
|
|
33
56
|
expiresInHours?: number;
|
|
34
57
|
}): Promise<ApiSuccessResponse<RoomBotToken>>;
|
|
35
58
|
listEmojis(roomId: string): Promise<ApiSuccessResponse<unknown[]>>;
|
|
36
|
-
listAuditLogs(roomId: string, limit?: number): Promise<ApiSuccessResponse<{
|
|
59
|
+
listAuditLogs(roomId: string, limit?: number, page?: number): Promise<ApiSuccessResponse<{
|
|
37
60
|
logs: unknown[];
|
|
38
61
|
}>>;
|
|
62
|
+
clearAuditLogs(roomId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
39
63
|
updateSettings(roomId: string, input: Record<string, unknown>): Promise<ApiSuccessResponse<{
|
|
40
64
|
room: Record<string, unknown>;
|
|
41
65
|
}>>;
|
|
@@ -46,6 +70,11 @@ export declare function createRoomResource(api: ApiLike): {
|
|
|
46
70
|
}): Promise<ApiSuccessResponse<{
|
|
47
71
|
room: Record<string, unknown>;
|
|
48
72
|
}>>;
|
|
73
|
+
updateWordFilters(roomId: string, input: {
|
|
74
|
+
blockedWordPatterns: string[];
|
|
75
|
+
}): Promise<ApiSuccessResponse<{
|
|
76
|
+
room: Record<string, unknown>;
|
|
77
|
+
}>>;
|
|
49
78
|
setRole(roomId: string, userId: string, role: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
50
79
|
setQueueAccess(roomId: string, userId: string, blocked: boolean): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|
|
51
80
|
unban(roomId: string, userId: string): Promise<ApiSuccessResponse<Record<string, unknown>>>;
|