@borealise/pipeline 1.0.0-alpha.5 → 2026.6.16-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/index.d.mts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +25 -0
- package/dist/index.mjs +25 -0
- package/package.json +49 -49
package/dist/index.d.mts
CHANGED
|
@@ -38,6 +38,25 @@ interface ChatSendPayload {
|
|
|
38
38
|
room_slug: string;
|
|
39
39
|
content: string;
|
|
40
40
|
}
|
|
41
|
+
interface WtSeekPayload {
|
|
42
|
+
room_slug: string;
|
|
43
|
+
position: number;
|
|
44
|
+
}
|
|
45
|
+
interface WtPausePayload {
|
|
46
|
+
room_slug: string;
|
|
47
|
+
}
|
|
48
|
+
interface WtResumePayload {
|
|
49
|
+
room_slug: string;
|
|
50
|
+
}
|
|
51
|
+
interface WtStateRequestPayload {
|
|
52
|
+
room_slug: string;
|
|
53
|
+
}
|
|
54
|
+
interface WtStateResponsePayload {
|
|
55
|
+
room_slug: string;
|
|
56
|
+
target_session_id: string;
|
|
57
|
+
paused: boolean;
|
|
58
|
+
position: number;
|
|
59
|
+
}
|
|
41
60
|
interface HelloPayload {
|
|
42
61
|
heartbeat_interval: number;
|
|
43
62
|
session_id: string;
|
|
@@ -161,6 +180,11 @@ declare class PipelineClient {
|
|
|
161
180
|
subscribe(events: EventCode[]): void;
|
|
162
181
|
unsubscribe(events: EventCode[]): void;
|
|
163
182
|
sendChatMessage(roomSlug: string, content: string): boolean;
|
|
183
|
+
sendWtSeek(roomSlug: string, position: number): void;
|
|
184
|
+
sendWtPause(roomSlug: string): void;
|
|
185
|
+
sendWtResume(roomSlug: string): void;
|
|
186
|
+
sendWtStateRequest(roomSlug: string): void;
|
|
187
|
+
sendWtStateResponse(roomSlug: string, targetSessionId: string, paused: boolean, position: number): void;
|
|
164
188
|
on<T = unknown>(event: EventCode, listener: EventListener<T>): () => void;
|
|
165
189
|
off<T = unknown>(event: EventCode, listener: EventListener<T>): void;
|
|
166
190
|
onConnection<K extends keyof PipelineEvents>(event: K, listener: PipelineEvents[K]): () => void;
|
|
@@ -187,4 +211,4 @@ declare class PipelineClient {
|
|
|
187
211
|
}
|
|
188
212
|
declare function createPipeline(options: PipelineClientOptions): PipelineClient;
|
|
189
213
|
|
|
190
|
-
export { type ChatSendPayload, type ConnectionState, type DispatchHandler, type ErrorPayload, type EventListener, type HeartbeatPayload, type HelloPayload, type IdentifyPayload, type InvalidSessionPayload, PipelineClient, type PipelineClientOptions, type PipelineEvents, type PipelineMessage, type PresenceUpdatePayload, type ReadyPayload, type RoomChatDeleteEvent, type RoomChatMessageEvent, type RoomChatUpdateEvent, type SubscribePayload, type UnsubscribePayload, createPipeline };
|
|
214
|
+
export { type ChatSendPayload, type ConnectionState, type DispatchHandler, type ErrorPayload, type EventListener, type HeartbeatPayload, type HelloPayload, type IdentifyPayload, type InvalidSessionPayload, PipelineClient, type PipelineClientOptions, type PipelineEvents, type PipelineMessage, type PresenceUpdatePayload, type ReadyPayload, type RoomChatDeleteEvent, type RoomChatMessageEvent, type RoomChatUpdateEvent, type SubscribePayload, type UnsubscribePayload, type WtPausePayload, type WtResumePayload, type WtSeekPayload, type WtStateRequestPayload, type WtStateResponsePayload, createPipeline };
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,25 @@ interface ChatSendPayload {
|
|
|
38
38
|
room_slug: string;
|
|
39
39
|
content: string;
|
|
40
40
|
}
|
|
41
|
+
interface WtSeekPayload {
|
|
42
|
+
room_slug: string;
|
|
43
|
+
position: number;
|
|
44
|
+
}
|
|
45
|
+
interface WtPausePayload {
|
|
46
|
+
room_slug: string;
|
|
47
|
+
}
|
|
48
|
+
interface WtResumePayload {
|
|
49
|
+
room_slug: string;
|
|
50
|
+
}
|
|
51
|
+
interface WtStateRequestPayload {
|
|
52
|
+
room_slug: string;
|
|
53
|
+
}
|
|
54
|
+
interface WtStateResponsePayload {
|
|
55
|
+
room_slug: string;
|
|
56
|
+
target_session_id: string;
|
|
57
|
+
paused: boolean;
|
|
58
|
+
position: number;
|
|
59
|
+
}
|
|
41
60
|
interface HelloPayload {
|
|
42
61
|
heartbeat_interval: number;
|
|
43
62
|
session_id: string;
|
|
@@ -161,6 +180,11 @@ declare class PipelineClient {
|
|
|
161
180
|
subscribe(events: EventCode[]): void;
|
|
162
181
|
unsubscribe(events: EventCode[]): void;
|
|
163
182
|
sendChatMessage(roomSlug: string, content: string): boolean;
|
|
183
|
+
sendWtSeek(roomSlug: string, position: number): void;
|
|
184
|
+
sendWtPause(roomSlug: string): void;
|
|
185
|
+
sendWtResume(roomSlug: string): void;
|
|
186
|
+
sendWtStateRequest(roomSlug: string): void;
|
|
187
|
+
sendWtStateResponse(roomSlug: string, targetSessionId: string, paused: boolean, position: number): void;
|
|
164
188
|
on<T = unknown>(event: EventCode, listener: EventListener<T>): () => void;
|
|
165
189
|
off<T = unknown>(event: EventCode, listener: EventListener<T>): void;
|
|
166
190
|
onConnection<K extends keyof PipelineEvents>(event: K, listener: PipelineEvents[K]): () => void;
|
|
@@ -187,4 +211,4 @@ declare class PipelineClient {
|
|
|
187
211
|
}
|
|
188
212
|
declare function createPipeline(options: PipelineClientOptions): PipelineClient;
|
|
189
213
|
|
|
190
|
-
export { type ChatSendPayload, type ConnectionState, type DispatchHandler, type ErrorPayload, type EventListener, type HeartbeatPayload, type HelloPayload, type IdentifyPayload, type InvalidSessionPayload, PipelineClient, type PipelineClientOptions, type PipelineEvents, type PipelineMessage, type PresenceUpdatePayload, type ReadyPayload, type RoomChatDeleteEvent, type RoomChatMessageEvent, type RoomChatUpdateEvent, type SubscribePayload, type UnsubscribePayload, createPipeline };
|
|
214
|
+
export { type ChatSendPayload, type ConnectionState, type DispatchHandler, type ErrorPayload, type EventListener, type HeartbeatPayload, type HelloPayload, type IdentifyPayload, type InvalidSessionPayload, PipelineClient, type PipelineClientOptions, type PipelineEvents, type PipelineMessage, type PresenceUpdatePayload, type ReadyPayload, type RoomChatDeleteEvent, type RoomChatMessageEvent, type RoomChatUpdateEvent, type SubscribePayload, type UnsubscribePayload, type WtPausePayload, type WtResumePayload, type WtSeekPayload, type WtStateRequestPayload, type WtStateResponsePayload, createPipeline };
|
package/dist/index.js
CHANGED
|
@@ -168,6 +168,31 @@ var _PipelineClient = class _PipelineClient {
|
|
|
168
168
|
});
|
|
169
169
|
return true;
|
|
170
170
|
}
|
|
171
|
+
sendWtSeek(roomSlug, position) {
|
|
172
|
+
if (!this.isIdentified) return;
|
|
173
|
+
this.send(import_shared.Opcodes.WT_SEEK, { room_slug: roomSlug, position });
|
|
174
|
+
}
|
|
175
|
+
sendWtPause(roomSlug) {
|
|
176
|
+
if (!this.isIdentified) return;
|
|
177
|
+
this.send(import_shared.Opcodes.WT_PAUSE, { room_slug: roomSlug });
|
|
178
|
+
}
|
|
179
|
+
sendWtResume(roomSlug) {
|
|
180
|
+
if (!this.isIdentified) return;
|
|
181
|
+
this.send(import_shared.Opcodes.WT_RESUME, { room_slug: roomSlug });
|
|
182
|
+
}
|
|
183
|
+
sendWtStateRequest(roomSlug) {
|
|
184
|
+
if (!this.isIdentified) return;
|
|
185
|
+
this.send(import_shared.Opcodes.WT_STATE_REQUEST, { room_slug: roomSlug });
|
|
186
|
+
}
|
|
187
|
+
sendWtStateResponse(roomSlug, targetSessionId, paused, position) {
|
|
188
|
+
if (!this.isIdentified) return;
|
|
189
|
+
this.send(import_shared.Opcodes.WT_STATE_RESPONSE, {
|
|
190
|
+
room_slug: roomSlug,
|
|
191
|
+
target_session_id: targetSessionId,
|
|
192
|
+
paused,
|
|
193
|
+
position
|
|
194
|
+
});
|
|
195
|
+
}
|
|
171
196
|
on(event, listener) {
|
|
172
197
|
if (!this.eventListeners.has(event)) {
|
|
173
198
|
this.eventListeners.set(event, /* @__PURE__ */ new Set());
|
package/dist/index.mjs
CHANGED
|
@@ -143,6 +143,31 @@ var _PipelineClient = class _PipelineClient {
|
|
|
143
143
|
});
|
|
144
144
|
return true;
|
|
145
145
|
}
|
|
146
|
+
sendWtSeek(roomSlug, position) {
|
|
147
|
+
if (!this.isIdentified) return;
|
|
148
|
+
this.send(Opcodes.WT_SEEK, { room_slug: roomSlug, position });
|
|
149
|
+
}
|
|
150
|
+
sendWtPause(roomSlug) {
|
|
151
|
+
if (!this.isIdentified) return;
|
|
152
|
+
this.send(Opcodes.WT_PAUSE, { room_slug: roomSlug });
|
|
153
|
+
}
|
|
154
|
+
sendWtResume(roomSlug) {
|
|
155
|
+
if (!this.isIdentified) return;
|
|
156
|
+
this.send(Opcodes.WT_RESUME, { room_slug: roomSlug });
|
|
157
|
+
}
|
|
158
|
+
sendWtStateRequest(roomSlug) {
|
|
159
|
+
if (!this.isIdentified) return;
|
|
160
|
+
this.send(Opcodes.WT_STATE_REQUEST, { room_slug: roomSlug });
|
|
161
|
+
}
|
|
162
|
+
sendWtStateResponse(roomSlug, targetSessionId, paused, position) {
|
|
163
|
+
if (!this.isIdentified) return;
|
|
164
|
+
this.send(Opcodes.WT_STATE_RESPONSE, {
|
|
165
|
+
room_slug: roomSlug,
|
|
166
|
+
target_session_id: targetSessionId,
|
|
167
|
+
paused,
|
|
168
|
+
position
|
|
169
|
+
});
|
|
170
|
+
}
|
|
146
171
|
on(event, listener) {
|
|
147
172
|
if (!this.eventListeners.has(event)) {
|
|
148
173
|
this.eventListeners.set(event, /* @__PURE__ */ new Set());
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@borealise/pipeline",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Official realtime pipeline client for Borealise",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.mjs",
|
|
12
|
-
"require": "./dist/index.js"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist",
|
|
17
|
-
"README.md"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
21
|
-
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
22
|
-
"lint": "tsc --noEmit",
|
|
23
|
-
"prepublishOnly": "npm run build"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"borealise",
|
|
27
|
-
"pipeline",
|
|
28
|
-
"websocket",
|
|
29
|
-
"realtime",
|
|
30
|
-
"client"
|
|
31
|
-
],
|
|
32
|
-
"author": "Borealise",
|
|
33
|
-
"license": "MIT",
|
|
34
|
-
"homepage": "https://borealise.com",
|
|
35
|
-
"repository": {
|
|
36
|
-
"type": "git",
|
|
37
|
-
"url": "https://github.com/Borealise-Platform/pipeline"
|
|
38
|
-
},
|
|
39
|
-
"bugs": {
|
|
40
|
-
"url": "https://github.com/Borealise-Platform/pipeline/issues"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"tsup": "^8.5.0",
|
|
44
|
-
"typescript": "^5.9.2"
|
|
45
|
-
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@borealise/shared": "^
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@borealise/pipeline",
|
|
3
|
+
"version": "2026.6.16-beta.0",
|
|
4
|
+
"description": "Official realtime pipeline client for Borealise",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
21
|
+
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
22
|
+
"lint": "tsc --noEmit",
|
|
23
|
+
"prepublishOnly": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"borealise",
|
|
27
|
+
"pipeline",
|
|
28
|
+
"websocket",
|
|
29
|
+
"realtime",
|
|
30
|
+
"client"
|
|
31
|
+
],
|
|
32
|
+
"author": "Borealise",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"homepage": "https://borealise.com",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/Borealise-Platform/pipeline"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/Borealise-Platform/pipeline/issues"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"tsup": "^8.5.0",
|
|
44
|
+
"typescript": "^5.9.2"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@borealise/shared": "^2026.6.11-beta.1"
|
|
48
|
+
}
|
|
49
|
+
}
|