@q9labsai/chalk-client 4.0.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/LICENSE +21 -0
- package/README.md +173 -0
- package/dist/access/base64-url.d.ts +2 -0
- package/dist/access/base64-url.d.ts.map +1 -0
- package/dist/access/episode-diagnostic-credential.d.ts +11 -0
- package/dist/access/episode-diagnostic-credential.d.ts.map +1 -0
- package/dist/access/grant.d.ts +53 -0
- package/dist/access/grant.d.ts.map +1 -0
- package/dist/access/grant.test.helpers.d.ts +10 -0
- package/dist/access/grant.test.helpers.d.ts.map +1 -0
- package/dist/access/manager.d.ts +36 -0
- package/dist/access/manager.d.ts.map +1 -0
- package/dist/chat-files/http-transport.d.ts +8 -0
- package/dist/chat-files/http-transport.d.ts.map +1 -0
- package/dist/chat-files/index.d.ts +3 -0
- package/dist/chat-files/index.d.ts.map +1 -0
- package/dist/chat-files/types.d.ts +37 -0
- package/dist/chat-files/types.d.ts.map +1 -0
- package/dist/chunk-5VXGLI3T.js +3385 -0
- package/dist/chunk-O22WFBKF.js +5161 -0
- package/dist/chunk-PBCGWE2V.js +811 -0
- package/dist/chunk-PBSYXPNJ.js +23 -0
- package/dist/chunk-QVHR3RMB.js +1229 -0
- package/dist/client.d.ts +6785 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/collaboration/index.d.ts +3 -0
- package/dist/collaboration/index.d.ts.map +1 -0
- package/dist/collaboration/types.d.ts +94 -0
- package/dist/collaboration/types.d.ts.map +1 -0
- package/dist/collaboration/wire.d.ts +19 -0
- package/dist/collaboration/wire.d.ts.map +1 -0
- package/dist/connection/dependencies.d.ts +112 -0
- package/dist/connection/dependencies.d.ts.map +1 -0
- package/dist/connection/diagnostics.d.ts +52 -0
- package/dist/connection/diagnostics.d.ts.map +1 -0
- package/dist/connection/index.d.ts +47 -0
- package/dist/connection/index.d.ts.map +1 -0
- package/dist/connection/lifecycle.d.ts +58 -0
- package/dist/connection/lifecycle.d.ts.map +1 -0
- package/dist/connection/media-devices.d.ts +6 -0
- package/dist/connection/media-devices.d.ts.map +1 -0
- package/dist/connection/production.d.ts +13 -0
- package/dist/connection/production.d.ts.map +1 -0
- package/dist/connection/snapshot.d.ts +23 -0
- package/dist/connection/snapshot.d.ts.map +1 -0
- package/dist/connection/types.d.ts +128 -0
- package/dist/connection/types.d.ts.map +1 -0
- package/dist/effect.d.ts +19 -0
- package/dist/effect.d.ts.map +1 -0
- package/dist/effect.js +7846 -0
- package/dist/episode-diagnostic-runtime.test.helpers.d.ts +3 -0
- package/dist/episode-diagnostic-runtime.test.helpers.d.ts.map +1 -0
- package/dist/generated/http-api.d.ts +6658 -0
- package/dist/generated/http-api.d.ts.map +1 -0
- package/dist/generated/schemas.d.ts +12076 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/sync.d.ts +3947 -0
- package/dist/generated/sync.d.ts.map +1 -0
- package/dist/generated/whiteboard-v1.d.ts +334 -0
- package/dist/generated/whiteboard-v1.d.ts.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +152 -0
- package/dist/media/client.d.ts +18 -0
- package/dist/media/client.d.ts.map +1 -0
- package/dist/media/cloudflare-sfu.d.ts +5 -0
- package/dist/media/cloudflare-sfu.d.ts.map +1 -0
- package/dist/media/index.d.ts +3 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +24 -0
- package/dist/media/plane.d.ts +24 -0
- package/dist/media/plane.d.ts.map +1 -0
- package/dist/media/tracks.d.ts +21 -0
- package/dist/media/tracks.d.ts.map +1 -0
- package/dist/media/transport.d.ts +3 -0
- package/dist/media/transport.d.ts.map +1 -0
- package/dist/media/types.d.ts +114 -0
- package/dist/media/types.d.ts.map +1 -0
- package/dist/server/chunk-A6YMG5FM.js +61 -0
- package/dist/server/client.d.cts +2 -0
- package/dist/server/client.d.ts +3 -0
- package/dist/server/client.d.ts.map +1 -0
- package/dist/server/errors.d.cts +18 -0
- package/dist/server/errors.d.ts +19 -0
- package/dist/server/errors.d.ts.map +1 -0
- package/dist/server/index.cjs +551 -0
- package/dist/server/index.d.cts +3 -0
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +474 -0
- package/dist/server/server-only.cjs +40 -0
- package/dist/server/server-only.d.cts +1 -0
- package/dist/server/server-only.d.ts +2 -0
- package/dist/server/server-only.d.ts.map +1 -0
- package/dist/server/server-only.js +9 -0
- package/dist/server/transport.d.cts +12 -0
- package/dist/server/transport.d.ts +13 -0
- package/dist/server/transport.d.ts.map +1 -0
- package/dist/server/types.d.cts +201 -0
- package/dist/server/types.d.ts +202 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/space-client/chat-controller-helpers.d.ts +15 -0
- package/dist/space-client/chat-controller-helpers.d.ts.map +1 -0
- package/dist/space-client/chat-controller.d.ts +34 -0
- package/dist/space-client/chat-controller.d.ts.map +1 -0
- package/dist/space-client/controller-effects.d.ts +45 -0
- package/dist/space-client/controller-effects.d.ts.map +1 -0
- package/dist/space-client/controller-parity.test.helpers.d.ts +150 -0
- package/dist/space-client/controller-parity.test.helpers.d.ts.map +1 -0
- package/dist/space-client/core.d.ts +52 -0
- package/dist/space-client/core.d.ts.map +1 -0
- package/dist/space-client/core.test.helpers.d.ts +14 -0
- package/dist/space-client/core.test.helpers.d.ts.map +1 -0
- package/dist/space-client/effect.d.ts +44 -0
- package/dist/space-client/effect.d.ts.map +1 -0
- package/dist/space-client/episode-diagnostic-registry.d.ts +13 -0
- package/dist/space-client/episode-diagnostic-registry.d.ts.map +1 -0
- package/dist/space-client/episode-diagnostic-render-registry.d.ts +4 -0
- package/dist/space-client/episode-diagnostic-render-registry.d.ts.map +1 -0
- package/dist/space-client/episode-diagnostic-runtime.d.ts +102 -0
- package/dist/space-client/episode-diagnostic-runtime.d.ts.map +1 -0
- package/dist/space-client/errors.d.ts +11 -0
- package/dist/space-client/errors.d.ts.map +1 -0
- package/dist/space-client/index.d.ts +5 -0
- package/dist/space-client/index.d.ts.map +1 -0
- package/dist/space-client/media-controller.d.ts +30 -0
- package/dist/space-client/media-controller.d.ts.map +1 -0
- package/dist/space-client/media-controller.test.helpers.d.ts +105 -0
- package/dist/space-client/media-controller.test.helpers.d.ts.map +1 -0
- package/dist/space-client/media-device-selection.d.ts +13 -0
- package/dist/space-client/media-device-selection.d.ts.map +1 -0
- package/dist/space-client/participants-controller.d.ts +33 -0
- package/dist/space-client/participants-controller.d.ts.map +1 -0
- package/dist/space-client/promise-facade.d.ts +12 -0
- package/dist/space-client/promise-facade.d.ts.map +1 -0
- package/dist/space-client/reactions-controller.d.ts +19 -0
- package/dist/space-client/reactions-controller.d.ts.map +1 -0
- package/dist/space-client/space-client.d.ts +5 -0
- package/dist/space-client/space-client.d.ts.map +1 -0
- package/dist/space-client/store.d.ts +29 -0
- package/dist/space-client/store.d.ts.map +1 -0
- package/dist/space-client/types.d.ts +222 -0
- package/dist/space-client/types.d.ts.map +1 -0
- package/dist/space-client/whiteboard-controller.d.ts +17 -0
- package/dist/space-client/whiteboard-controller.d.ts.map +1 -0
- package/dist/sync/browser.d.ts +9 -0
- package/dist/sync/browser.d.ts.map +1 -0
- package/dist/sync/canonical.d.ts +7 -0
- package/dist/sync/canonical.d.ts.map +1 -0
- package/dist/sync/errors.d.ts +9 -0
- package/dist/sync/errors.d.ts.map +1 -0
- package/dist/sync/index.d.ts +13 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +51 -0
- package/dist/sync/react-native.d.ts +42 -0
- package/dist/sync/react-native.d.ts.map +1 -0
- package/dist/sync/types.d.ts +28 -0
- package/dist/sync/types.d.ts.map +1 -0
- package/dist/sync/v1-client.d.ts +59 -0
- package/dist/sync/v1-client.d.ts.map +1 -0
- package/dist/sync/v1-codec.d.ts +5 -0
- package/dist/sync/v1-codec.d.ts.map +1 -0
- package/dist/sync/v1-create.d.ts +12 -0
- package/dist/sync/v1-create.d.ts.map +1 -0
- package/dist/sync/v1-persistence.d.ts +10 -0
- package/dist/sync/v1-persistence.d.ts.map +1 -0
- package/dist/sync/v1-platform-persistence.d.ts +26 -0
- package/dist/sync/v1-platform-persistence.d.ts.map +1 -0
- package/dist/sync/v1-reducer.d.ts +17 -0
- package/dist/sync/v1-reducer.d.ts.map +1 -0
- package/dist/sync/v1-types.d.ts +197 -0
- package/dist/sync/v1-types.d.ts.map +1 -0
- package/dist/telemetry/attributes.d.ts +7 -0
- package/dist/telemetry/attributes.d.ts.map +1 -0
- package/dist/telemetry/client.d.ts +44 -0
- package/dist/telemetry/client.d.ts.map +1 -0
- package/dist/telemetry/delivery.d.ts +107 -0
- package/dist/telemetry/delivery.d.ts.map +1 -0
- package/dist/telemetry/exporter.d.ts +38 -0
- package/dist/telemetry/exporter.d.ts.map +1 -0
- package/dist/telemetry/index.d.ts +7 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +48 -0
- package/dist/telemetry/journey.d.ts +52 -0
- package/dist/telemetry/journey.d.ts.map +1 -0
- package/dist/telemetry/random.d.ts +18 -0
- package/dist/telemetry/random.d.ts.map +1 -0
- package/dist/telemetry/rtc.d.ts +35 -0
- package/dist/telemetry/rtc.d.ts.map +1 -0
- package/dist/telemetry/storage.d.ts +22 -0
- package/dist/telemetry/storage.d.ts.map +1 -0
- package/dist/telemetry/sync.d.ts +10 -0
- package/dist/telemetry/sync.d.ts.map +1 -0
- package/dist/telemetry/test-support.d.ts +51 -0
- package/dist/telemetry/test-support.d.ts.map +1 -0
- package/dist/telemetry/trace.d.ts +18 -0
- package/dist/telemetry/trace.d.ts.map +1 -0
- package/dist/telemetry/types.d.ts +109 -0
- package/dist/telemetry/types.d.ts.map +1 -0
- package/dist/webhooks/chunk-UNMJZNTZ.js +31 -0
- package/dist/webhooks/errors.d.cts +8 -0
- package/dist/webhooks/errors.d.ts +9 -0
- package/dist/webhooks/errors.d.ts.map +1 -0
- package/dist/webhooks/generated/event-v1.d.cts +764 -0
- package/dist/webhooks/generated/event-v1.d.ts +765 -0
- package/dist/webhooks/generated/event-v1.d.ts.map +1 -0
- package/dist/webhooks/generated/fixtures-v1.d.cts +46 -0
- package/dist/webhooks/generated/fixtures-v1.d.ts +47 -0
- package/dist/webhooks/generated/fixtures-v1.d.ts.map +1 -0
- package/dist/webhooks/index.cjs +1242 -0
- package/dist/webhooks/index.d.cts +5 -0
- package/dist/webhooks/index.d.ts +6 -0
- package/dist/webhooks/index.d.ts.map +1 -0
- package/dist/webhooks/index.js +1197 -0
- package/dist/webhooks/processor.d.cts +21 -0
- package/dist/webhooks/processor.d.ts +22 -0
- package/dist/webhooks/processor.d.ts.map +1 -0
- package/dist/webhooks/server-only.cjs +36 -0
- package/dist/webhooks/server-only.d.cts +1 -0
- package/dist/webhooks/server-only.d.ts +2 -0
- package/dist/webhooks/server-only.d.ts.map +1 -0
- package/dist/webhooks/server-only.js +9 -0
- package/dist/webhooks/test.cjs +160 -0
- package/dist/webhooks/test.d.cts +42 -0
- package/dist/webhooks/test.d.ts +43 -0
- package/dist/webhooks/test.d.ts.map +1 -0
- package/dist/webhooks/test.js +137 -0
- package/dist/webhooks/types.d.cts +55 -0
- package/dist/webhooks/types.d.ts +56 -0
- package/dist/webhooks/types.d.ts.map +1 -0
- package/dist/webhooks/validate.d.cts +5 -0
- package/dist/webhooks/validate.d.ts +6 -0
- package/dist/webhooks/validate.d.ts.map +1 -0
- package/dist/webhooks/verify.d.cts +10 -0
- package/dist/webhooks/verify.d.ts +11 -0
- package/dist/webhooks/verify.d.ts.map +1 -0
- package/dist/whiteboard/file-http-transport.d.ts +9 -0
- package/dist/whiteboard/file-http-transport.d.ts.map +1 -0
- package/dist/whiteboard/index.d.ts +7 -0
- package/dist/whiteboard/index.d.ts.map +1 -0
- package/dist/whiteboard/types.d.ts +139 -0
- package/dist/whiteboard/types.d.ts.map +1 -0
- package/dist/whiteboard/v1-client.d.ts +18 -0
- package/dist/whiteboard/v1-client.d.ts.map +1 -0
- package/dist/whiteboard/v1-codec.d.ts +5 -0
- package/dist/whiteboard/v1-codec.d.ts.map +1 -0
- package/dist/whiteboard/v1-create.d.ts +8 -0
- package/dist/whiteboard/v1-create.d.ts.map +1 -0
- package/dist/whiteboard/v1-multipart.d.ts +30 -0
- package/dist/whiteboard/v1-multipart.d.ts.map +1 -0
- package/dist/whiteboard/v1-persistence.d.ts +9 -0
- package/dist/whiteboard/v1-persistence.d.ts.map +1 -0
- package/package.json +222 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { ManagedRuntime } from "effect";
|
|
2
|
+
import type { ChalkReaction, ChalkReactionEvent } from "../collaboration/types";
|
|
3
|
+
import type { ConnectionLifecycleCapability } from "../connection";
|
|
4
|
+
import type { V1EpisodeSnapshot } from "../sync";
|
|
5
|
+
import type { ChalkWhiteboardSummary, ChalkWhiteboardV1Transport } from "../whiteboard/types";
|
|
6
|
+
import { ParticipantsControllerService } from "./participants-controller";
|
|
7
|
+
import { ReactionsControllerService } from "./reactions-controller";
|
|
8
|
+
import type { EpisodeDiagnosticRuntime } from "./episode-diagnostic-runtime";
|
|
9
|
+
import { SpaceStore } from "./store";
|
|
10
|
+
import { WhiteboardControllerService } from "./whiteboard-controller";
|
|
11
|
+
export declare const START: number;
|
|
12
|
+
export declare function disposeControllerRuntimes(): Promise<void>;
|
|
13
|
+
export declare class ControllerHarness {
|
|
14
|
+
#private;
|
|
15
|
+
readonly store: SpaceStore;
|
|
16
|
+
readonly sync: FakeSync;
|
|
17
|
+
readonly connection: ConnectionLifecycleCapability;
|
|
18
|
+
constructor(initial?: V1EpisodeSnapshot);
|
|
19
|
+
participants(diagnostics?: EpisodeDiagnosticRuntime): {
|
|
20
|
+
runtime: ManagedRuntime.ManagedRuntime<ParticipantsControllerService, never>;
|
|
21
|
+
controller: import("./participants-controller").ParticipantsControllerEffects;
|
|
22
|
+
};
|
|
23
|
+
reactions(diagnostics?: EpisodeDiagnosticRuntime): {
|
|
24
|
+
runtime: ManagedRuntime.ManagedRuntime<ReactionsControllerService, never>;
|
|
25
|
+
controller: import("./reactions-controller").ReactionsControllerEffects;
|
|
26
|
+
};
|
|
27
|
+
whiteboard(factory: (input: {
|
|
28
|
+
readonly token: () => Promise<string>;
|
|
29
|
+
readonly onSummary: (summary: ChalkWhiteboardSummary) => void;
|
|
30
|
+
}) => ChalkWhiteboardV1Transport | null): {
|
|
31
|
+
runtime: ManagedRuntime.ManagedRuntime<WhiteboardControllerService, never>;
|
|
32
|
+
controller: import("./whiteboard-controller").WhiteboardControllerEffects;
|
|
33
|
+
};
|
|
34
|
+
connect(): void;
|
|
35
|
+
disconnect(): void;
|
|
36
|
+
}
|
|
37
|
+
declare class FakeSync {
|
|
38
|
+
#private;
|
|
39
|
+
collaborationCapabilities: Readonly<Record<string, readonly ("sendReaction" | "sendChat")[]>>;
|
|
40
|
+
snapshot: V1EpisodeSnapshot;
|
|
41
|
+
assignRole: import("vitest").Mock<() => Promise<{
|
|
42
|
+
type: "ack";
|
|
43
|
+
command_id: string;
|
|
44
|
+
delivery: "original";
|
|
45
|
+
outcome: "committed";
|
|
46
|
+
event_id: string;
|
|
47
|
+
revision: number;
|
|
48
|
+
state_digest: string;
|
|
49
|
+
}>>;
|
|
50
|
+
muteParticipant: import("vitest").Mock<() => Promise<{
|
|
51
|
+
type: "ack";
|
|
52
|
+
command_id: string;
|
|
53
|
+
delivery: "original";
|
|
54
|
+
outcome: "committed";
|
|
55
|
+
event_id: string;
|
|
56
|
+
revision: number;
|
|
57
|
+
state_digest: string;
|
|
58
|
+
}>>;
|
|
59
|
+
stopParticipantCamera: import("vitest").Mock<() => Promise<{
|
|
60
|
+
type: "ack";
|
|
61
|
+
command_id: string;
|
|
62
|
+
delivery: "original";
|
|
63
|
+
outcome: "committed";
|
|
64
|
+
event_id: string;
|
|
65
|
+
revision: number;
|
|
66
|
+
state_digest: string;
|
|
67
|
+
}>>;
|
|
68
|
+
stopParticipantScreenShare: import("vitest").Mock<() => Promise<{
|
|
69
|
+
type: "ack";
|
|
70
|
+
command_id: string;
|
|
71
|
+
delivery: "original";
|
|
72
|
+
outcome: "committed";
|
|
73
|
+
event_id: string;
|
|
74
|
+
revision: number;
|
|
75
|
+
state_digest: string;
|
|
76
|
+
}>>;
|
|
77
|
+
requestUnmute: import("vitest").Mock<() => Promise<{
|
|
78
|
+
type: "directed_request_result";
|
|
79
|
+
request_id: string;
|
|
80
|
+
result: "delivered";
|
|
81
|
+
}>>;
|
|
82
|
+
requestStartCamera: import("vitest").Mock<() => Promise<{
|
|
83
|
+
type: "directed_request_result";
|
|
84
|
+
request_id: string;
|
|
85
|
+
result: "delivered";
|
|
86
|
+
}>>;
|
|
87
|
+
removeParticipant: import("vitest").Mock<() => Promise<{
|
|
88
|
+
type: "ack";
|
|
89
|
+
command_id: string;
|
|
90
|
+
delivery: "original";
|
|
91
|
+
outcome: "committed";
|
|
92
|
+
event_id: string;
|
|
93
|
+
revision: number;
|
|
94
|
+
state_digest: string;
|
|
95
|
+
}>>;
|
|
96
|
+
admit: import("vitest").Mock<() => Promise<{
|
|
97
|
+
type: "ack";
|
|
98
|
+
command_id: string;
|
|
99
|
+
delivery: "original";
|
|
100
|
+
outcome: "committed";
|
|
101
|
+
event_id: string;
|
|
102
|
+
revision: number;
|
|
103
|
+
state_digest: string;
|
|
104
|
+
}>>;
|
|
105
|
+
deny: import("vitest").Mock<() => Promise<{
|
|
106
|
+
type: "ack";
|
|
107
|
+
command_id: string;
|
|
108
|
+
delivery: "original";
|
|
109
|
+
outcome: "committed";
|
|
110
|
+
event_id: string;
|
|
111
|
+
revision: number;
|
|
112
|
+
state_digest: string;
|
|
113
|
+
}>>;
|
|
114
|
+
setHandRaised: import("vitest").Mock<() => Promise<{
|
|
115
|
+
type: "ack";
|
|
116
|
+
command_id: string;
|
|
117
|
+
delivery: "original";
|
|
118
|
+
outcome: "committed";
|
|
119
|
+
event_id: string;
|
|
120
|
+
revision: number;
|
|
121
|
+
state_digest: string;
|
|
122
|
+
}>>;
|
|
123
|
+
setDisplayName: import("vitest").Mock<() => Promise<{
|
|
124
|
+
type: "ack";
|
|
125
|
+
command_id: string;
|
|
126
|
+
delivery: "original";
|
|
127
|
+
outcome: "committed";
|
|
128
|
+
event_id: string;
|
|
129
|
+
revision: number;
|
|
130
|
+
state_digest: string;
|
|
131
|
+
}>>;
|
|
132
|
+
sendReaction: import("vitest").Mock<(value: ChalkReaction) => Promise<ChalkReactionEvent>>;
|
|
133
|
+
constructor(snapshotValue: V1EpisodeSnapshot);
|
|
134
|
+
getSnapshot: () => V1EpisodeSnapshot;
|
|
135
|
+
getParticipantCollaborationCapabilities: () => Readonly<Record<string, readonly ("sendChat" | "sendReaction")[]>>;
|
|
136
|
+
subscribe: (listener: (snapshot: V1EpisodeSnapshot) => void) => () => boolean;
|
|
137
|
+
subscribeCollaboration: (listener: (event: {
|
|
138
|
+
readonly type: "reaction";
|
|
139
|
+
readonly reaction: ChalkReactionEvent;
|
|
140
|
+
}) => void) => () => boolean;
|
|
141
|
+
emit: () => void;
|
|
142
|
+
emitReaction(value: ChalkReactionEvent): void;
|
|
143
|
+
}
|
|
144
|
+
export declare function snapshot(input?: {
|
|
145
|
+
readonly media?: V1EpisodeSnapshot["media"];
|
|
146
|
+
}): V1EpisodeSnapshot;
|
|
147
|
+
export declare function reaction(eventId: string, value: ChalkReaction, expiresInMs: number): ChalkReactionEvent;
|
|
148
|
+
export declare function whiteboardTransport(): ChalkWhiteboardV1Transport;
|
|
149
|
+
export {};
|
|
150
|
+
//# sourceMappingURL=controller-parity.test.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller-parity.test.helpers.d.ts","sourceRoot":"","sources":["../../src/space-client/controller-parity.test.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,QAAQ,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EA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BAAgB,QAAQ,CAAC,KAAK,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;CAAO,GAAG,iBAAiB,CA2BvG;AAMD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,GAAG,kBAAkB,CAEvG;AAMD,wBAAgB,mBAAmB,IAAI,0BAA0B,CAYhE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Clock, Context, Effect, Layer } from "effect";
|
|
2
|
+
import { type AccessGrant } from "../access/grant";
|
|
3
|
+
import { ConnectionLifecycleService, type ConnectionLifecycleCapability } from "../connection";
|
|
4
|
+
import { ConnectionPlatformService, type ConnectionAccessRequest, type ConnectionDependencies, type ConnectionSyncClient } from "../connection/dependencies";
|
|
5
|
+
import type { ConnectionDiagnostic } from "../connection/diagnostics";
|
|
6
|
+
import { type ControllerEffects } from "./controller-effects";
|
|
7
|
+
import { SpaceClientError } from "./errors";
|
|
8
|
+
import { MediaDeviceSelection } from "./media-device-selection";
|
|
9
|
+
import { SpaceStore, SpaceStoreService } from "./store";
|
|
10
|
+
import type { ClientEventHandler, ClientEventName, JoinOptions, SpaceClientOptions, SpaceSnapshot } from "./types";
|
|
11
|
+
import type { JourneyTelemetryContext } from "../telemetry/types";
|
|
12
|
+
import { EpisodeDiagnosticRuntime } from "./episode-diagnostic-runtime";
|
|
13
|
+
type ClientEffect<A> = Effect.Effect<A, SpaceClientError>;
|
|
14
|
+
export type PlatformConnectionAccess = (request?: ConnectionAccessRequest) => AccessGrant | Promise<AccessGrant>;
|
|
15
|
+
export type SpaceClientPlatform = {
|
|
16
|
+
readonly apiBaseUrl?: string;
|
|
17
|
+
readonly syncUrl?: string;
|
|
18
|
+
readonly whiteboardUrl?: string | null;
|
|
19
|
+
readonly dependencies?: Partial<ConnectionDependencies>;
|
|
20
|
+
/** Private adapter seam for runtimes that need the full refresh request. */
|
|
21
|
+
readonly connectionAccess?: PlatformConnectionAccess;
|
|
22
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
23
|
+
readonly randomUUID?: () => string;
|
|
24
|
+
readonly syncStartupTimeoutMs?: number;
|
|
25
|
+
readonly initialMicrophoneEnabled?: boolean;
|
|
26
|
+
readonly initialCameraEnabled?: boolean;
|
|
27
|
+
readonly telemetry?: JourneyTelemetryContext;
|
|
28
|
+
readonly onConnectionDiagnostic?: (event: ConnectionDiagnostic) => void;
|
|
29
|
+
};
|
|
30
|
+
declare const SpaceClientCoreService_base: Context.ServiceClass<SpaceClientCoreService, "@chalk/client/SpaceClientCore", SpaceClientCore>;
|
|
31
|
+
export declare class SpaceClientCoreService extends SpaceClientCoreService_base {
|
|
32
|
+
}
|
|
33
|
+
/** Production composition keeps every mutable owner inside a scoped Layer. */
|
|
34
|
+
export declare const makeSpaceClientCoreLayer: (options: SpaceClientOptions, platform?: SpaceClientPlatform) => Layer.Layer<SpaceClientCoreService, never>;
|
|
35
|
+
/** Composes the core from replaceable native lifecycle/platform/store Layers. */
|
|
36
|
+
export declare const makeSpaceClientCoreLayerFromServices: (options: SpaceClientOptions, platform?: SpaceClientPlatform) => Layer.Layer<SpaceClientCoreService, never, Clock.Clock | ConnectionLifecycleService | ConnectionPlatformService | SpaceStoreService>;
|
|
37
|
+
export declare class SpaceClientCore {
|
|
38
|
+
#private;
|
|
39
|
+
readonly controllers: ControllerEffects;
|
|
40
|
+
constructor(connection: ConnectionLifecycleCapability, _selection: MediaDeviceSelection, store: SpaceStore, controllers: ControllerEffects, episodeDiagnostics?: EpisodeDiagnosticRuntime, episodeDiagnosticDependencies?: ConnectionDependencies, episodeDiagnosticSyncClients?: ReadonlySet<ConnectionSyncClient>);
|
|
41
|
+
getSnapshot: () => SpaceSnapshot;
|
|
42
|
+
get changes(): import("effect/Stream").Stream<SpaceSnapshot, never, never>;
|
|
43
|
+
subscribe: (listener: () => void) => (() => void);
|
|
44
|
+
join(options?: JoinOptions): ClientEffect<void>;
|
|
45
|
+
leave(): ClientEffect<void>;
|
|
46
|
+
endEpisode(): ClientEffect<void>;
|
|
47
|
+
extendEpisode(minutes: number): ClientEffect<void>;
|
|
48
|
+
on<TEvent extends ClientEventName>(event: TEvent, handler: ClientEventHandler<TEvent>): () => void;
|
|
49
|
+
dispose(): void;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/space-client/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAY,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACjE,OAAO,EAA0B,KAAK,WAAW,EAA0B,MAAM,iBAAiB,CAAC;AACnG,OAAO,EAAE,0BAA0B,EAAgC,KAAK,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAC7H,OAAO,EAAE,yBAAyB,EAA4D,KAAK,uBAAuB,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvN,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAwB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAuB,MAAM,SAAS,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAkB,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnI,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAmC,MAAM,8BAA8B,CAAC;AAYzG,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AAEJ,qBAAa,eAAe;;IAC1B,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;IAiBxC,YACE,UAAU,EAAE,6BAA6B,EACzC,UAAU,EAAE,oBAAoB,EAChC,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,iBAAiB,EAC9B,kBAAkB,CAAC,EAAE,wBAAwB,EAC7C,6BAA6B,CAAC,EAAE,sBAAsB,EACtD,4BAA4B,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAC,EAgBjE;IAED,WAAW,QAAO,aAAa,CAA8B;IAC7D,IAAI,OAAO,gEAEV;IACD,SAAS,aAAc,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAAoC;IACpF,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,YAAY,CAAC,IAAI,CAAC,CAsBlD;IACD,KAAK,IAAI,YAAY,CAAC,IAAI,CAAC,CAO1B;IACD,UAAU,IAAI,YAAY,CAAC,IAAI,CAAC,CAM/B;IACD,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAMjD;IACD,EAAE,CAAC,MAAM,SAAS,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM,IAAI,CAGjG;IACD,OAAO,IAAI,IAAI,CASd;CAuGF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AccessGrant } from "./index";
|
|
2
|
+
import type { ConnectionMediaClient, ConnectionSyncClient } from "../connection/dependencies";
|
|
3
|
+
import type { SpaceClientPlatform } from "./core";
|
|
4
|
+
export type CoreTestMediaSnapshot = ReturnType<ConnectionMediaClient["getSnapshot"]>;
|
|
5
|
+
export type CoreTestPlatform = SpaceClientPlatform & {
|
|
6
|
+
readonly media: {
|
|
7
|
+
readonly getSnapshot: () => CoreTestMediaSnapshot;
|
|
8
|
+
readonly emit: (snapshot: CoreTestMediaSnapshot) => void;
|
|
9
|
+
};
|
|
10
|
+
readonly sync: ConnectionSyncClient;
|
|
11
|
+
};
|
|
12
|
+
export declare function createCoreTestPlatform(): CoreTestPlatform;
|
|
13
|
+
export declare function opaqueAccessGrant(value: string | number, suffix?: string): AccessGrant;
|
|
14
|
+
//# sourceMappingURL=core.test.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.test.helpers.d.ts","sourceRoot":"","sources":["../../src/space-client/core.test.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC9F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAElD,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,CAAC;AACrF,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG;IACnD,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,WAAW,EAAE,MAAM,qBAAqB,CAAC;QAClD,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;KAC1D,CAAC;IACF,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;CACrC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,gBAAgB,CA2EzD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,SAAgB,GAAG,WAAW,CAS7F"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Effect, Scope } from "effect";
|
|
2
|
+
import type { ChalkChatPageResult, ChalkDirectedRequestResult } from "../collaboration/types";
|
|
3
|
+
import type { ChalkWhiteboardV1Transport } from "../whiteboard/types";
|
|
4
|
+
import type { ControllerEffects } from "./controller-effects";
|
|
5
|
+
import { SpaceClientCore, type SpaceClientPlatform } from "./core";
|
|
6
|
+
import type { SpaceClientError } from "./errors";
|
|
7
|
+
import type { ActiveReaction, ChatAttachment, ChatMessage, ChatReadReceipt, ChatSendInput, ChatUploadFile, ClientEventHandler, ClientEventName, JoinOptions, MediaRequestKind, Reaction, SpaceClientOptions, SpaceSnapshot } from "./types";
|
|
8
|
+
type ClientEffect<T> = Effect.Effect<T, SpaceClientError>;
|
|
9
|
+
export type EffectMediaController = ControllerEffects["media"];
|
|
10
|
+
export type EffectChatController = {
|
|
11
|
+
readonly files: {
|
|
12
|
+
readonly upload: (file: ChatUploadFile) => ClientEffect<ChatAttachment>;
|
|
13
|
+
readonly url: (attachment: ChatAttachment) => string;
|
|
14
|
+
};
|
|
15
|
+
readonly send: (input: ChatSendInput) => ClientEffect<ChatMessage>;
|
|
16
|
+
readonly loadOlder: () => ClientEffect<ChalkChatPageResult>;
|
|
17
|
+
readonly markRead: (messageId: string) => ClientEffect<ChatReadReceipt | null>;
|
|
18
|
+
};
|
|
19
|
+
export type EffectParticipantsController = ControllerEffects["participants"];
|
|
20
|
+
export type EffectReactionsController = ControllerEffects["reactions"];
|
|
21
|
+
export type EffectWhiteboardController = {
|
|
22
|
+
readonly transport: () => ChalkWhiteboardV1Transport | null;
|
|
23
|
+
};
|
|
24
|
+
export type EffectSpaceClient = {
|
|
25
|
+
readonly media: EffectMediaController;
|
|
26
|
+
readonly chat: EffectChatController;
|
|
27
|
+
readonly participants: EffectParticipantsController;
|
|
28
|
+
readonly reactions: EffectReactionsController;
|
|
29
|
+
readonly whiteboard: EffectWhiteboardController;
|
|
30
|
+
readonly join: (options?: JoinOptions) => ClientEffect<void>;
|
|
31
|
+
readonly leave: () => ClientEffect<void>;
|
|
32
|
+
readonly dispose: () => Effect.Effect<void, unknown>;
|
|
33
|
+
readonly subscribe: (listener: () => void) => () => void;
|
|
34
|
+
readonly changes: import("effect").Stream.Stream<SpaceSnapshot>;
|
|
35
|
+
readonly getSnapshot: () => SpaceSnapshot;
|
|
36
|
+
readonly endEpisode: () => ClientEffect<void>;
|
|
37
|
+
readonly extendEpisode: (minutes: number) => ClientEffect<void>;
|
|
38
|
+
readonly on: <TEvent extends ClientEventName>(event: TEvent, handler: ClientEventHandler<TEvent>) => () => void;
|
|
39
|
+
};
|
|
40
|
+
export declare function createEffectSpaceClient(options: SpaceClientOptions, platform?: SpaceClientPlatform): Effect.Effect<EffectSpaceClient, never, Scope.Scope>;
|
|
41
|
+
export declare function effectClientFromCore(core: SpaceClientCore, dispose?: () => Effect.Effect<void, unknown>): EffectSpaceClient;
|
|
42
|
+
export type { SpaceClientPlatform } from "./core";
|
|
43
|
+
export type { ChalkChatPageResult, ChalkDirectedRequestResult, MediaRequestKind, Reaction, ActiveReaction };
|
|
44
|
+
//# sourceMappingURL=effect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../src/space-client/effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAe,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAoD,KAAK,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AACrH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5O,KAAK,YAAY,CAAC,CAAC,IAAI,MAAM,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from "../connection/lifecycle";
|
|
2
|
+
import type { ConnectionDependencies, ConnectionSyncClient } from "../connection/dependencies";
|
|
3
|
+
import type { EpisodeDiagnosticRuntime } from "./episode-diagnostic-runtime";
|
|
4
|
+
export declare function registerEpisodeDiagnosticConnection(connection: ConnectionLifecycleCapability, diagnostics: EpisodeDiagnosticRuntime): void;
|
|
5
|
+
export declare function episodeDiagnosticsForConnection(connection: ConnectionLifecycleCapability): EpisodeDiagnosticRuntime | undefined;
|
|
6
|
+
export declare function unregisterEpisodeDiagnosticConnection(connection: ConnectionLifecycleCapability, diagnostics?: EpisodeDiagnosticRuntime): void;
|
|
7
|
+
export declare function registerEpisodeDiagnosticDependencies(dependencies: ConnectionDependencies, diagnostics: EpisodeDiagnosticRuntime): void;
|
|
8
|
+
export declare function episodeDiagnosticsForDependencies(dependencies: ConnectionDependencies): EpisodeDiagnosticRuntime | undefined;
|
|
9
|
+
export declare function unregisterEpisodeDiagnosticDependencies(dependencies: ConnectionDependencies, diagnostics?: EpisodeDiagnosticRuntime): void;
|
|
10
|
+
export declare function registerEpisodeDiagnosticSyncClient<T extends ConnectionSyncClient>(client: T, diagnostics: EpisodeDiagnosticRuntime): T;
|
|
11
|
+
export declare function episodeDiagnosticsForSyncClient(client: object): EpisodeDiagnosticRuntime | undefined;
|
|
12
|
+
export declare function unregisterEpisodeDiagnosticSyncClient(client: object, diagnostics?: EpisodeDiagnosticRuntime): void;
|
|
13
|
+
//# sourceMappingURL=episode-diagnostic-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"episode-diagnostic-registry.d.ts","sourceRoot":"","sources":["../../src/space-client/episode-diagnostic-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC/F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAM7E,wBAAgB,mCAAmC,CAAC,UAAU,EAAE,6BAA6B,EAAE,WAAW,EAAE,wBAAwB,GAAG,IAAI,CAE1I;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,6BAA6B,GAAG,wBAAwB,GAAG,SAAS,CAE/H;AAED,wBAAgB,qCAAqC,CAAC,UAAU,EAAE,6BAA6B,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAE7I;AAED,wBAAgB,qCAAqC,CAAC,YAAY,EAAE,sBAAsB,EAAE,WAAW,EAAE,wBAAwB,GAAG,IAAI,CAEvI;AAED,wBAAgB,iCAAiC,CAAC,YAAY,EAAE,sBAAsB,GAAG,wBAAwB,GAAG,SAAS,CAE5H;AAED,wBAAgB,uCAAuC,CAAC,YAAY,EAAE,sBAAsB,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAE1I;AAED,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,oBAAoB,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,wBAAwB,GAAG,CAAC,CAGvI;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,wBAAwB,GAAG,SAAS,CAEpG;AAED,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAElH"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EpisodeDiagnosticRuntime } from "./episode-diagnostic-runtime";
|
|
2
|
+
export declare function registerEpisodeDiagnosticTrack(track: MediaStreamTrack, source: "camera" | "screen", diagnostics: EpisodeDiagnosticRuntime): void;
|
|
3
|
+
export declare function unregisterEpisodeDiagnosticTrack(track: MediaStreamTrack, diagnostics?: EpisodeDiagnosticRuntime): void;
|
|
4
|
+
//# sourceMappingURL=episode-diagnostic-render-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"episode-diagnostic-render-registry.d.ts","sourceRoot":"","sources":["../../src/space-client/episode-diagnostic-render-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAU7E,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,GAAG,QAAQ,EAAE,WAAW,EAAE,wBAAwB,GAAG,IAAI,CAwBhJ;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAQtH"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { type DiagnosticAttributes, type DiagnosticEventDraft, type DiagnosticEventState, type DiagnosticRelease } from "@q9labsai/diagnostics-contracts";
|
|
2
|
+
import { parseEpisodeDiagnosticCredential, type EpisodeDiagnosticCredential } from "../access/episode-diagnostic-credential";
|
|
3
|
+
export type EpisodeDiagnosticRuntimeOptions = Readonly<{
|
|
4
|
+
apiBaseUrl: string;
|
|
5
|
+
createId: () => string;
|
|
6
|
+
fetch?: typeof globalThis.fetch;
|
|
7
|
+
now?: () => number;
|
|
8
|
+
setTimeout?: (callback: () => void, milliseconds: number) => unknown;
|
|
9
|
+
clearTimeout?: (handle: unknown) => void;
|
|
10
|
+
journeyId?: string;
|
|
11
|
+
traceparent?: string;
|
|
12
|
+
tracestate?: string;
|
|
13
|
+
maxRingEvents?: number;
|
|
14
|
+
maxRingBytes?: number;
|
|
15
|
+
maxRingAgeMs?: number;
|
|
16
|
+
maxQueueEvents?: number;
|
|
17
|
+
maxQueueBytes?: number;
|
|
18
|
+
maxQueueAgeMs?: number;
|
|
19
|
+
maxBatchEvents?: number;
|
|
20
|
+
maxBatchBytes?: number;
|
|
21
|
+
maxRetryAttempts?: number;
|
|
22
|
+
retryDelayMs?: number;
|
|
23
|
+
release?: DiagnosticRelease;
|
|
24
|
+
exporter?: EpisodeDiagnosticExporter;
|
|
25
|
+
}>;
|
|
26
|
+
export type EpisodeDiagnosticDeliveryResult = Readonly<{
|
|
27
|
+
accepted: readonly string[];
|
|
28
|
+
duplicates: readonly string[];
|
|
29
|
+
conflicts: readonly string[];
|
|
30
|
+
}>;
|
|
31
|
+
export type EpisodeDiagnosticExporter = (request: Readonly<{
|
|
32
|
+
endpoint: string;
|
|
33
|
+
token: string;
|
|
34
|
+
signal: AbortSignal;
|
|
35
|
+
body: Readonly<{
|
|
36
|
+
version: 1;
|
|
37
|
+
producer: Readonly<{
|
|
38
|
+
id: "sdk";
|
|
39
|
+
instanceId: string;
|
|
40
|
+
generation: number;
|
|
41
|
+
}>;
|
|
42
|
+
events: readonly DiagnosticEventDraft[];
|
|
43
|
+
}>;
|
|
44
|
+
}>) => Promise<EpisodeDiagnosticDeliveryResult | void>;
|
|
45
|
+
export type EpisodeDiagnosticCorrelationInput = Readonly<{
|
|
46
|
+
journeyId?: string;
|
|
47
|
+
traceId?: string;
|
|
48
|
+
spanId?: string;
|
|
49
|
+
requestId?: string;
|
|
50
|
+
commandId?: string;
|
|
51
|
+
retryGroupRef?: string;
|
|
52
|
+
attempt?: number;
|
|
53
|
+
provider?: Readonly<{
|
|
54
|
+
value: string;
|
|
55
|
+
storage: "hmac";
|
|
56
|
+
}>;
|
|
57
|
+
}>;
|
|
58
|
+
export type EpisodeDiagnosticObservation = Readonly<{
|
|
59
|
+
name: string;
|
|
60
|
+
phase: string;
|
|
61
|
+
state: DiagnosticEventState;
|
|
62
|
+
operationRef?: string;
|
|
63
|
+
parentOperationRef?: string;
|
|
64
|
+
checkpoint?: string;
|
|
65
|
+
attributes?: Readonly<Record<string, unknown>>;
|
|
66
|
+
correlation?: EpisodeDiagnosticCorrelationInput;
|
|
67
|
+
}>;
|
|
68
|
+
export type EpisodeDiagnosticOperation = Readonly<{
|
|
69
|
+
ref: string;
|
|
70
|
+
observe: (phase: string, checkpoint: string, attributes?: Readonly<Record<string, unknown>>) => void;
|
|
71
|
+
succeed: (attributes?: Readonly<Record<string, unknown>>) => void;
|
|
72
|
+
fail: (reason?: string) => void;
|
|
73
|
+
notObservable: (checkpoint: string, reason?: string) => void;
|
|
74
|
+
}>;
|
|
75
|
+
/** Private, framework-neutral semantic diagnostics. It never owns or gates product work. */
|
|
76
|
+
export declare class EpisodeDiagnosticRuntime {
|
|
77
|
+
#private;
|
|
78
|
+
constructor(options: EpisodeDiagnosticRuntimeOptions);
|
|
79
|
+
rotateCredential(credential: EpisodeDiagnosticCredential | null): void;
|
|
80
|
+
context(operationRef?: string): Readonly<{
|
|
81
|
+
journeyId: string;
|
|
82
|
+
traceparent: string;
|
|
83
|
+
tracestate?: string;
|
|
84
|
+
producerOperationRef?: string;
|
|
85
|
+
}>;
|
|
86
|
+
activeContext(): ReturnType<EpisodeDiagnosticRuntime["context"]> | undefined;
|
|
87
|
+
startOperation(name: string, attributes?: Readonly<Record<string, unknown>>, parentOperationRef?: string, producerOperationRef?: string, correlationInput?: EpisodeDiagnosticCorrelationInput): EpisodeDiagnosticOperation | undefined;
|
|
88
|
+
observe(input: EpisodeDiagnosticObservation): void;
|
|
89
|
+
observePromise<T>(operation: EpisodeDiagnosticOperation | undefined, promise: Promise<T>): Promise<T>;
|
|
90
|
+
dispose(): void;
|
|
91
|
+
/** Internal deterministic proof seam; it is not exported by the package. */
|
|
92
|
+
inspect(): Readonly<{
|
|
93
|
+
ring: readonly DiagnosticEventDraft[];
|
|
94
|
+
queue: readonly DiagnosticEventDraft[];
|
|
95
|
+
quarantine: readonly DiagnosticEventDraft[];
|
|
96
|
+
dropped: number;
|
|
97
|
+
credentialGeneration: number | null;
|
|
98
|
+
}>;
|
|
99
|
+
}
|
|
100
|
+
export { parseEpisodeDiagnosticCredential };
|
|
101
|
+
export type { DiagnosticAttributes, EpisodeDiagnosticCredential };
|
|
102
|
+
//# sourceMappingURL=episode-diagnostic-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"episode-diagnostic-runtime.d.ts","sourceR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,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,iCAAiC,GAAG,0BAA0B,GAAG,SAAS,CA2BrO;IAED,OAAO,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI,CAWjD;IAED,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,0BAA0B,GAAG,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAOpG;IAED,OAAO,IAAI,IAAI,CAKd;IAED,4EAA4E;IAC5E,OAAO,IAAI,QAAQ,CAAC;QAAE,IAAI,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAQxM;CA4OF;AA0KD,OAAO,EAAE,gCAAgC,EAAE,CAAC;AAC5C,YAAY,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ClientFailure, ErrorCode } from "./types";
|
|
2
|
+
declare const SpaceClientError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
3
|
+
readonly _tag: "SpaceClientError";
|
|
4
|
+
} & Readonly<A>;
|
|
5
|
+
export declare class SpaceClientError extends SpaceClientError_base<ClientFailure> {
|
|
6
|
+
}
|
|
7
|
+
export declare function normalizeClientError(cause: unknown, fallback?: ErrorCode): SpaceClientError;
|
|
8
|
+
export declare function failureFromError(error: SpaceClientError): ClientFailure;
|
|
9
|
+
export declare function isAccessInvalid(cause: unknown): boolean;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/space-client/errors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;;;;AAExD,qBAAa,gBAAiB,SAAQ,sBAAqC,aAAa,CAAC;CAAG;AA+B5F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAE,SAAmC,GAAG,gBAAgB,CAcpH;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,aAAa,CAEvE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAGvD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SpaceClientError } from "./errors";
|
|
2
|
+
export { createSpaceClient } from "./space-client";
|
|
3
|
+
export type { AccessGrant } from "../access/grant";
|
|
4
|
+
export type { AccessContext, AccessReason, ActiveReaction, AdmissionRequest, Capability, ChatAttachment, ChatController, ChatFilesController, ChatMessage, ChatReadReceipt, ChatSendInput, ChatSlice, ChatUploadFile, ClientEventHandler, ClientEventMap, ClientEventName, ClientFailure, ConnectionSlice, ConnectionStatus, EpisodeSummary, ErrorCode, GetAccess, IncomingMediaRequest, JoinOptions, LocalMedia, Logger, MediaController, MediaDevice, MediaRequestKind, MediaSlice, Participant, ParticipantsController, ParticipantsSlice, Reaction, ReactionsController, ReactionsSlice, RemoteMedia, SelfSlice, SpaceClient, SpaceClientOptions, SpaceSnapshot, WhiteboardController, WhiteboardSlice, } from "./types";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/space-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,MAAM,EACN,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Clock, Context, Effect, Layer, Scope } from "effect";
|
|
2
|
+
import type { ConnectionLifecycleCapability } from "../connection";
|
|
3
|
+
import type { EpisodeDiagnosticRuntime } from "./episode-diagnostic-runtime";
|
|
4
|
+
import { SpaceClientError } from "./errors";
|
|
5
|
+
import type { MediaDeviceSelection } from "./media-device-selection";
|
|
6
|
+
import { SpaceStore } from "./store";
|
|
7
|
+
type ClientEffect<A> = Effect.Effect<A, SpaceClientError>;
|
|
8
|
+
export type MediaControllerEffects = {
|
|
9
|
+
readonly configure: (intent: Readonly<{
|
|
10
|
+
microphone?: boolean;
|
|
11
|
+
camera?: boolean;
|
|
12
|
+
}>) => void;
|
|
13
|
+
readonly setMicrophoneEnabled: (enabled: boolean) => ClientEffect<void>;
|
|
14
|
+
readonly setCameraEnabled: (enabled: boolean) => ClientEffect<void>;
|
|
15
|
+
readonly setScreenShareEnabled: (enabled: boolean) => ClientEffect<void>;
|
|
16
|
+
readonly selectMicrophone: (deviceId: string) => ClientEffect<void>;
|
|
17
|
+
readonly selectCamera: (deviceId: string) => ClientEffect<void>;
|
|
18
|
+
readonly selectSpeaker: (deviceId: string) => ClientEffect<void>;
|
|
19
|
+
readonly acceptRequest: (requestId: string) => ClientEffect<void>;
|
|
20
|
+
readonly declineRequest: (requestId: string) => ClientEffect<void>;
|
|
21
|
+
readonly dispose: () => void;
|
|
22
|
+
};
|
|
23
|
+
declare const MediaControllerService_base: Context.ServiceClass<MediaControllerService, "@chalk/client/MediaController", MediaControllerEffects>;
|
|
24
|
+
export declare class MediaControllerService extends MediaControllerService_base {
|
|
25
|
+
}
|
|
26
|
+
/** Scoped media controller: all source work is serialized with Effect semaphores. */
|
|
27
|
+
export declare const makeMediaController: (connection: ConnectionLifecycleCapability, store: SpaceStore, selection: MediaDeviceSelection, diagnostics?: EpisodeDiagnosticRuntime) => Effect.Effect<MediaControllerEffects, never, Clock.Clock | Scope.Scope>;
|
|
28
|
+
export declare const makeMediaControllerLayer: (connection: ConnectionLifecycleCapability, store: SpaceStore, selection: MediaDeviceSelection, diagnostics?: EpisodeDiagnosticRuntime) => Layer.Layer<MediaControllerService, never, Clock.Clock>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=media-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-controller.d.ts","sourceRoot":"","sources":["../../src/space-client/media-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAa,MAAM,QAAQ,CAAC;AAEzE,OAAO,KAAK,EAAE,6BAA6B,EAAmB,MAAM,eAAe,CAAC;AAGpF,OAAO,KAAK,EAAE,wBAAwB,EAAE,M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AAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;;AACF,qBAAa,sBAAuB,SAAQ,2BAAkG;CAAG;AAEjJ,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,eAAgB,6BAA6B,SAAS,UAAU,aAAa,oBAAoB,gBAAgB,wBAAwB,KAAG,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CA0B9O,CAAC;AAEL,eAAO,MAAM,wBAAwB,eAAgB,6BAA6B,SAAS,UAAU,aAAa,oBAAoB,gBAAgB,wBAAwB,4DAAyG,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type { CloudflareSFUSnapshot } from "../media";
|
|
3
|
+
import type { ConnectionLifecycleCapability, ConnectionPorts } from "../connection";
|
|
4
|
+
import type { EpisodeDiagnosticRuntime } from "./episode-diagnostic-runtime";
|
|
5
|
+
import type { V1DirectedRequest } from "../sync";
|
|
6
|
+
import { SpaceStore } from "./store";
|
|
7
|
+
type FakeConnectionState = "idle" | "joining" | "live" | "reconnecting" | "leaving" | "left" | "failed";
|
|
8
|
+
export declare function createMediaControllerHarness(diagnostics?: EpisodeDiagnosticRuntime): {
|
|
9
|
+
controller: {
|
|
10
|
+
configure: (intent: Readonly<{
|
|
11
|
+
microphone?: boolean;
|
|
12
|
+
camera?: boolean;
|
|
13
|
+
}>) => void;
|
|
14
|
+
setMicrophoneEnabled: (enabled: boolean) => Promise<void>;
|
|
15
|
+
setCameraEnabled: (enabled: boolean) => Promise<void>;
|
|
16
|
+
setScreenShareEnabled: (enabled: boolean) => Promise<void>;
|
|
17
|
+
selectMicrophone: (deviceId: string) => Promise<void>;
|
|
18
|
+
selectCamera: (deviceId: string) => Promise<void>;
|
|
19
|
+
selectSpeaker: (deviceId: string) => Promise<void>;
|
|
20
|
+
acceptRequest: (requestId: string) => Promise<void>;
|
|
21
|
+
declineRequest: (requestId: string) => Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
connection: FakeConnection;
|
|
24
|
+
enumerateDevices: import("vitest").Mock<() => Promise<readonly MediaDeviceInfo[]>>;
|
|
25
|
+
getDisplayMedia: import("vitest").Mock<() => Promise<MediaStream>>;
|
|
26
|
+
getUserMedia: import("vitest").Mock<() => Promise<MediaStream>>;
|
|
27
|
+
media: FakeMedia;
|
|
28
|
+
selectSpeaker: import("vitest").Mock<() => Promise<undefined>>;
|
|
29
|
+
store: SpaceStore;
|
|
30
|
+
sync: FakeSync;
|
|
31
|
+
activate: () => void;
|
|
32
|
+
};
|
|
33
|
+
export declare class FakeTrack extends EventTarget {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly kind: "audio" | "video";
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
readyState: MediaStreamTrackState;
|
|
38
|
+
constructor(id: string, kind: "audio" | "video");
|
|
39
|
+
stop(): void;
|
|
40
|
+
endFromBrowser(): void;
|
|
41
|
+
}
|
|
42
|
+
export declare function stream(...tracks: FakeTrack[]): MediaStream;
|
|
43
|
+
export declare function deferred<T>(): {
|
|
44
|
+
promise: Promise<T>;
|
|
45
|
+
resolve: (value: T | PromiseLike<T>) => void;
|
|
46
|
+
};
|
|
47
|
+
declare class FakeConnection {
|
|
48
|
+
#private;
|
|
49
|
+
refreshes: number;
|
|
50
|
+
setInitialMedia(provider: (intent: Readonly<{
|
|
51
|
+
microphone: boolean;
|
|
52
|
+
camera: boolean;
|
|
53
|
+
}>) => Effect.Effect<MediaStream, unknown>): Effect.Effect<void>;
|
|
54
|
+
captureInitial(intent: Readonly<{
|
|
55
|
+
microphone: boolean;
|
|
56
|
+
camera: boolean;
|
|
57
|
+
}>): Promise<MediaStream>;
|
|
58
|
+
getSnapshot: () => ReturnType<ConnectionLifecycleCapability["getSnapshot"]>;
|
|
59
|
+
subscribe: (listener: () => void) => (() => void);
|
|
60
|
+
subscribePorts: (listener: (ports: ConnectionPorts | null) => void) => (() => void);
|
|
61
|
+
subscribeScreenEnded: (listener: () => void) => (() => void);
|
|
62
|
+
runCommand: <T>(operation: (ports: ConnectionPorts) => Effect.Effect<T, unknown>) => Effect.Effect<T, unknown>;
|
|
63
|
+
setState(state: FakeConnectionState): void;
|
|
64
|
+
setPorts(ports: ConnectionPorts | null): void;
|
|
65
|
+
leave(): void;
|
|
66
|
+
emitScreenEnded(): void;
|
|
67
|
+
}
|
|
68
|
+
declare class FakeMedia {
|
|
69
|
+
#private;
|
|
70
|
+
readonly clearPreparedLocalTrack: import("vitest").Mock<(source: "microphone" | "camera" | "screen") => Promise<void>>;
|
|
71
|
+
readonly prepareLocalTrack: import("vitest").Mock<(source: "microphone" | "camera" | "screen", track: MediaStreamTrack) => void>;
|
|
72
|
+
getSnapshot: () => CloudflareSFUSnapshot;
|
|
73
|
+
subscribe: (listener: () => void) => (() => void);
|
|
74
|
+
setEnabled(source: "microphone" | "camera" | "screen", enabled: boolean): void;
|
|
75
|
+
setRemoteTracks(remoteTracks: CloudflareSFUSnapshot["remoteTracks"]): void;
|
|
76
|
+
}
|
|
77
|
+
declare class FakeSync {
|
|
78
|
+
#private;
|
|
79
|
+
readonly setMicrophoneEnabled: import("vitest").Mock<(enabled: boolean) => Promise<{
|
|
80
|
+
readonly operationId: "operation-1";
|
|
81
|
+
readonly name: "set_microphone_enabled";
|
|
82
|
+
readonly serverOutcome: "confirmed";
|
|
83
|
+
readonly mediaPlaneOutcome: "confirmed";
|
|
84
|
+
}>>;
|
|
85
|
+
readonly setCameraEnabled: import("vitest").Mock<(enabled: boolean) => Promise<{
|
|
86
|
+
readonly operationId: "operation-1";
|
|
87
|
+
readonly name: "set_microphone_enabled";
|
|
88
|
+
readonly serverOutcome: "confirmed";
|
|
89
|
+
readonly mediaPlaneOutcome: "confirmed";
|
|
90
|
+
}>>;
|
|
91
|
+
readonly setScreenShareEnabled: import("vitest").Mock<(enabled: boolean) => Promise<{
|
|
92
|
+
readonly operationId: "operation-1";
|
|
93
|
+
readonly name: "set_microphone_enabled";
|
|
94
|
+
readonly serverOutcome: "confirmed";
|
|
95
|
+
readonly mediaPlaneOutcome: "confirmed";
|
|
96
|
+
}>>;
|
|
97
|
+
constructor(media: FakeMedia);
|
|
98
|
+
getSnapshot: () => import("..").V1EpisodeSnapshot;
|
|
99
|
+
subscribe: (listener: (snapshot: ReturnType<ConnectionPorts["sync"]["getSnapshot"]>) => void) => (() => void);
|
|
100
|
+
onDirectedRequest: (listener: (request: V1DirectedRequest) => void) => (() => void);
|
|
101
|
+
emitRequest(request: V1DirectedRequest): void;
|
|
102
|
+
setSnapshot(snapshot: ReturnType<ConnectionPorts["sync"]["getSnapshot"]>): void;
|
|
103
|
+
}
|
|
104
|
+
export {};
|
|
105
|
+
//# sourceMappingURL=media-controller.test.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-controller.test.helpers.d.ts","sourceRoot":"","sources":["../../src/space-client/media-controller.test.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,EAAyB,MAAM,QAAQ,CAAC;AAExE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEpF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,KAAK,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExG,wBAAgB,4BAA4B,CAAC,WAAW,CAAC,EAAE,wBAAwB;;4BA0B3D,QAAQ,CAAC;YAAE,UAAU,CAAC,EAAE,OAAO,CAAC;YAAC,MAAM,CAAC,EAAE,OAAO,C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C,qBAAqB,kCAAyB,OAAO;8BAqDxC,aAAa;uBAAQ,wBAAwB;gCAAiB,WAAW;oCAAqB,WAAW;QAlD5H;IAEH,YAAY,KAAK,EAAE,SAAS,EAE3B;IAED,WAAW,uCAAwB;IACnC,SAAS,aAAc,CAAC,QAAQ,EAAE,UAAU,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAI1G;IACF,iBAAiB,aAAc,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAGhF;IAEF,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAE5C;IAED,WAAW,CAAC,QAAQ,EAAE,UAAU,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,GAAG,IAAI,CAG9E;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConnectionMediaDevices } from "../connection/dependencies";
|
|
2
|
+
type CaptureSource = "microphone" | "camera";
|
|
3
|
+
export declare class MediaDeviceSelection implements ConnectionMediaDevices {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(devices: ConnectionMediaDevices);
|
|
6
|
+
getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
|
|
7
|
+
getDisplayMedia(constraints: DisplayMediaStreamOptions): Promise<MediaStream>;
|
|
8
|
+
enumerateDevices(): Promise<readonly MediaDeviceInfo[]>;
|
|
9
|
+
selectCapture(source: CaptureSource, deviceId: string): void;
|
|
10
|
+
selectSpeaker(deviceId: string): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=media-device-selection.d.ts.map
|