ttfm-socket 1.1.4 → 1.1.5-beta.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-client/actions/addDj.d.ts +1 -1
- package/dist-client/actions/joinRoom.d.ts +1 -1
- package/dist-client/actions/playOneTimeAnimation.d.ts +2 -2
- package/dist-client/actions/removeDj.d.ts +2 -2
- package/dist-client/actions/skipSong.d.ts +1 -1
- package/dist-client/actions/updateNextSong.d.ts +1 -1
- package/dist-client/actions/voteOnSong.d.ts +2 -2
- package/dist-client/client/ActionheroWebsocketClient.js +2 -2
- package/dist-client/client/SocketClient.d.ts +3 -3
- package/dist-client/client/index.d.ts +14 -14
- package/dist-client/client/types.d.ts +1 -1
- package/dist-client/types/messages.d.ts +2 -2
- package/dist-client/types/services.d.ts +1 -6
- package/dist-client/types/state.d.ts +1 -1
- package/package.json +1 -1
- package/dist-client/types/jsonPatch.d.ts +0 -31
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Action, ParamsFrom } from "actionhero";
|
|
2
|
-
import { ActionName, MiddlewareName } from "../types/names";
|
|
2
|
+
import { ActionName, MiddlewareName } from "../types/names.js";
|
|
3
3
|
export declare class AddDjAction extends Action {
|
|
4
4
|
name: ActionName.addDj;
|
|
5
5
|
description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Action, ParamsFrom } from "actionhero";
|
|
2
|
-
import { ActionName, MiddlewareName } from "../types/names";
|
|
3
|
-
import { OneTimeAnimationType } from "../types/messages";
|
|
2
|
+
import { ActionName, MiddlewareName } from "../types/names.js";
|
|
3
|
+
import { OneTimeAnimationType } from "../types/messages.js";
|
|
4
4
|
export declare class PlayOneTimeAnimationAction extends Action {
|
|
5
5
|
name: ActionName.playOneTimeAnimation;
|
|
6
6
|
description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Action, ParamsFrom } from "actionhero";
|
|
2
|
-
import { ActionName, MiddlewareName } from "../types/names";
|
|
3
|
-
import { ServerRoomState } from "../types/state";
|
|
2
|
+
import { ActionName, MiddlewareName } from "../types/names.js";
|
|
3
|
+
import { ServerRoomState } from "../types/state.js";
|
|
4
4
|
export declare class RemoveDjAction extends Action {
|
|
5
5
|
name: ActionName.removeDj;
|
|
6
6
|
description: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Action, ParamsFrom } from "actionhero";
|
|
2
|
-
import { ActionName, MiddlewareName } from "../types/names";
|
|
2
|
+
import { ActionName, MiddlewareName } from "../types/names.js";
|
|
3
3
|
export declare class SkipSongAction extends Action {
|
|
4
4
|
name: ActionName.skipSong;
|
|
5
5
|
description: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Action, ParamsFrom } from "actionhero";
|
|
2
|
-
import { ActionName, MiddlewareName } from "../types/names";
|
|
2
|
+
import { ActionName, MiddlewareName } from "../types/names.js";
|
|
3
3
|
export declare class UpdateNextSongAction extends Action {
|
|
4
4
|
name: ActionName.updateNextSong;
|
|
5
5
|
description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Action, ParamsFrom } from "actionhero";
|
|
2
|
-
import { ActionName, MiddlewareName } from "../types/names";
|
|
3
|
-
import { SongVotes } from "../types/state";
|
|
2
|
+
import { ActionName, MiddlewareName } from "../types/names.js";
|
|
3
|
+
import { SongVotes } from "../types/state.js";
|
|
4
4
|
export declare class VoteOnSongAction extends Action {
|
|
5
5
|
name: ActionName.voteOnSong;
|
|
6
6
|
description: string;
|
|
@@ -3355,8 +3355,8 @@
|
|
|
3355
3355
|
}
|
|
3356
3356
|
};
|
|
3357
3357
|
if (typeof Primus === 'undefined') {
|
|
3358
|
-
var util = require('util');
|
|
3359
|
-
var EventEmitter = require('events').EventEmitter;
|
|
3358
|
+
var util = require('node:util');
|
|
3359
|
+
var EventEmitter = require('node:events').EventEmitter;
|
|
3360
3360
|
util.inherits(ActionheroWebsocketClient, EventEmitter);
|
|
3361
3361
|
}
|
|
3362
3362
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import EventEmitter from "eventemitter3";
|
|
2
|
-
import { ServerMessage, StatefulServerMessage, StatelessServerMessage, StatefulServerMessageNameType, StatelessServerMessageNameType, ExtractStatelessServerMessage } from "../types/messages";
|
|
3
|
-
import { JoinRoomAction } from "../actions/joinRoom";
|
|
4
|
-
import type { ParamsFrom, SimpleAction } from "./types";
|
|
2
|
+
import { ServerMessage, StatefulServerMessage, StatelessServerMessage, StatefulServerMessageNameType, StatelessServerMessageNameType, ExtractStatelessServerMessage } from "../types/messages.js";
|
|
3
|
+
import { JoinRoomAction } from "../actions/joinRoom.js";
|
|
4
|
+
import type { ParamsFrom, SimpleAction } from "./types.js";
|
|
5
5
|
type ConnectionState = "connected" | "disconnected" | "reconnecting" | "timeout";
|
|
6
6
|
type ClientActionParams<A extends SimpleAction> = Omit<ParamsFrom<A>, "roomUuid" | "userUuid" | "tokenRole">;
|
|
7
7
|
type RequiredFieldsOnly<T> = {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { SocketClient } from "./SocketClient";
|
|
2
|
-
export type { JoinRoomAction } from "../actions/joinRoom";
|
|
3
|
-
export type { AddDjAction } from "../actions/addDj";
|
|
4
|
-
export type { PlayOneTimeAnimationAction } from "../actions/playOneTimeAnimation";
|
|
5
|
-
export type { RemoveDjAction } from "../actions/removeDj";
|
|
6
|
-
export type { SkipSongAction } from "../actions/skipSong";
|
|
7
|
-
export type { UpdateNextSongAction } from "../actions/updateNextSong";
|
|
8
|
-
export type { VoteOnSongAction } from "../actions/voteOnSong";
|
|
9
|
-
export { ActionName } from "../types/names";
|
|
10
|
-
export * from "../types/messages";
|
|
11
|
-
export * from "./types";
|
|
12
|
-
export * from "../types/services";
|
|
13
|
-
export type { AllClientUserData as AllUserData, AvatarPosition, ClientRoomState as RoomState, ClientDj as Dj, ClientRoomUser as RoomUser, ClientNowPlaying as NowPlaying, SongVotes, GhostUserProfile, VoteCounts, } from "../types/state";
|
|
14
|
-
export { TokenRole } from "../types/services";
|
|
1
|
+
export { SocketClient } from "./SocketClient.js";
|
|
2
|
+
export type { JoinRoomAction } from "../actions/joinRoom.js";
|
|
3
|
+
export type { AddDjAction } from "../actions/addDj.js";
|
|
4
|
+
export type { PlayOneTimeAnimationAction } from "../actions/playOneTimeAnimation.js";
|
|
5
|
+
export type { RemoveDjAction } from "../actions/removeDj.js";
|
|
6
|
+
export type { SkipSongAction } from "../actions/skipSong.js";
|
|
7
|
+
export type { UpdateNextSongAction } from "../actions/updateNextSong.js";
|
|
8
|
+
export type { VoteOnSongAction } from "../actions/voteOnSong.js";
|
|
9
|
+
export { ActionName } from "../types/names.js";
|
|
10
|
+
export * from "../types/messages.js";
|
|
11
|
+
export * from "./types.js";
|
|
12
|
+
export * from "../types/services.js";
|
|
13
|
+
export type { AllClientUserData as AllUserData, AvatarPosition, ClientRoomState as RoomState, ClientDj as Dj, ClientRoomUser as RoomUser, ClientNowPlaying as NowPlaying, SongVotes, GhostUserProfile, VoteCounts, } from "../types/state.js";
|
|
14
|
+
export { TokenRole } from "../types/services.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Operation } from "fast-json-patch";
|
|
2
|
+
import { JoinRoomAction } from "../actions/joinRoom.js";
|
|
2
3
|
import { ActionResponse } from "./actionhero";
|
|
3
|
-
import { Operation } from "./jsonPatch";
|
|
4
4
|
export declare const StatefulServerMessageName: {
|
|
5
5
|
readonly addedDj: "addedDj";
|
|
6
6
|
readonly lookedUpSong: "lookedUpSong";
|
|
@@ -106,14 +106,12 @@ export declare namespace UserRoles {
|
|
|
106
106
|
export declare type RoomDto = {
|
|
107
107
|
song?: MinimalCrateSongResDTO | null;
|
|
108
108
|
unlisted?: boolean;
|
|
109
|
-
varietyStyleMusic?: boolean;
|
|
110
|
-
explicit: boolean;
|
|
111
109
|
id?: number;
|
|
112
110
|
name: string;
|
|
113
111
|
description: string;
|
|
114
112
|
vibe: string;
|
|
115
113
|
djType: RoomDto.djType;
|
|
116
|
-
musicProviderKeys: Array<"apple" | "audius" | "napster" | "soundCloudPublic" | "spotify" | "uploadService" | "youtube"
|
|
114
|
+
musicProviderKeys: Array<"apple" | "audius" | "napster" | "soundCloudPublic" | "spotify" | "uploadService" | "youtube">;
|
|
117
115
|
numberOfDjs: number;
|
|
118
116
|
songsPerDj: number;
|
|
119
117
|
usersInRoomUuids?: Array<string>;
|
|
@@ -137,7 +135,6 @@ export declare type RoomDto = {
|
|
|
137
135
|
isLive: boolean;
|
|
138
136
|
liveAudio: boolean;
|
|
139
137
|
posterUrl?: string | null;
|
|
140
|
-
discordServer?: string | null;
|
|
141
138
|
externalUrl?: string | null;
|
|
142
139
|
uuid: string;
|
|
143
140
|
isGuestPasswordProtected: boolean;
|
|
@@ -174,7 +171,6 @@ export declare type OtherUserProfileResDto = {
|
|
|
174
171
|
uuid: string;
|
|
175
172
|
avatarId: string;
|
|
176
173
|
nickname: string;
|
|
177
|
-
discordNickname: string;
|
|
178
174
|
firstName: string;
|
|
179
175
|
lastName: string;
|
|
180
176
|
pronoun: string;
|
|
@@ -189,7 +185,6 @@ export declare type OtherUserProfileResDto = {
|
|
|
189
185
|
twitter: string;
|
|
190
186
|
snapchat: string;
|
|
191
187
|
tiktok: string;
|
|
192
|
-
discord: string;
|
|
193
188
|
badges: Array<"VERIFIED" | "PLATINUM" | "DOUBLE_PLATINUM" | "JQBX" | "STAFF">;
|
|
194
189
|
priceForGig: number;
|
|
195
190
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MinimalCrateSongResDTO, OtherUserProfileResDto, RoomDto, TokenRole, UserRoles } from "./services";
|
|
1
|
+
import { MinimalCrateSongResDTO, OtherUserProfileResDto, RoomDto, TokenRole, UserRoles } from "./services.js";
|
|
2
2
|
export type GhostUserProfile = Pick<OtherUserProfileResDto, "color" | "uuid" | "avatarId" | "nickname">;
|
|
3
3
|
export type ServerDj = {
|
|
4
4
|
userUuid: string;
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export interface BaseOperation {
|
|
2
|
-
path: string;
|
|
3
|
-
}
|
|
4
|
-
export interface AddOperation<T> extends BaseOperation {
|
|
5
|
-
op: "add";
|
|
6
|
-
value: T;
|
|
7
|
-
}
|
|
8
|
-
export interface RemoveOperation extends BaseOperation {
|
|
9
|
-
op: "remove";
|
|
10
|
-
}
|
|
11
|
-
export interface ReplaceOperation<T> extends BaseOperation {
|
|
12
|
-
op: "replace";
|
|
13
|
-
value: T;
|
|
14
|
-
}
|
|
15
|
-
export interface MoveOperation extends BaseOperation {
|
|
16
|
-
op: "move";
|
|
17
|
-
from: string;
|
|
18
|
-
}
|
|
19
|
-
export interface CopyOperation extends BaseOperation {
|
|
20
|
-
op: "copy";
|
|
21
|
-
from: string;
|
|
22
|
-
}
|
|
23
|
-
export interface TestOperation<T> extends BaseOperation {
|
|
24
|
-
op: "test";
|
|
25
|
-
value: T;
|
|
26
|
-
}
|
|
27
|
-
export interface GetOperation<T> extends BaseOperation {
|
|
28
|
-
op: "_get";
|
|
29
|
-
value: T;
|
|
30
|
-
}
|
|
31
|
-
export declare type Operation = AddOperation<unknown> | RemoveOperation | ReplaceOperation<unknown> | MoveOperation | CopyOperation | TestOperation<unknown> | GetOperation<unknown>;
|