@waitaya.buc/client-js 0.1.0-alpha.2 → 0.1.0-alpha.4

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.
Files changed (55) hide show
  1. package/README.md +13 -6
  2. package/dist/adapters/livekit/livekit.adapter.d.ts.map +1 -1
  3. package/dist/adapters/livekit/livekit.adapter.js +3 -1
  4. package/dist/adapters/livekit/livekit.adapter.js.map +1 -1
  5. package/dist/adapters/livekit/react-native.d.ts +1 -7
  6. package/dist/adapters/livekit/react-native.d.ts.map +1 -1
  7. package/dist/adapters/livekit/react-native.js +5 -0
  8. package/dist/adapters/livekit/react-native.js.map +1 -1
  9. package/dist/adapters/livekit/service-adapters/chat.adapter.d.ts +36 -0
  10. package/dist/adapters/livekit/service-adapters/chat.adapter.d.ts.map +1 -0
  11. package/dist/adapters/livekit/service-adapters/chat.adapter.js +145 -0
  12. package/dist/adapters/livekit/service-adapters/chat.adapter.js.map +1 -0
  13. package/dist/adapters/livekit/service-adapters/index.d.ts +1 -0
  14. package/dist/adapters/livekit/service-adapters/index.d.ts.map +1 -1
  15. package/dist/adapters/livekit/service-adapters/index.js +1 -0
  16. package/dist/adapters/livekit/service-adapters/index.js.map +1 -1
  17. package/dist/core/errors/error-codes.d.ts +6 -0
  18. package/dist/core/errors/error-codes.d.ts.map +1 -1
  19. package/dist/core/errors/error-codes.js +6 -0
  20. package/dist/core/errors/error-codes.js.map +1 -1
  21. package/dist/core/errors/vroom.error.d.ts +18 -0
  22. package/dist/core/errors/vroom.error.d.ts.map +1 -1
  23. package/dist/core/errors/vroom.error.js +27 -0
  24. package/dist/core/errors/vroom.error.js.map +1 -1
  25. package/dist/core/ports/outbound/chat-adapter.port.d.ts +29 -0
  26. package/dist/core/ports/outbound/chat-adapter.port.d.ts.map +1 -0
  27. package/dist/core/ports/outbound/chat-adapter.port.js +2 -0
  28. package/dist/core/ports/outbound/chat-adapter.port.js.map +1 -0
  29. package/dist/core/ports/outbound/react-native-bindings.port.d.ts +39 -0
  30. package/dist/core/ports/outbound/react-native-bindings.port.d.ts.map +1 -0
  31. package/dist/core/ports/outbound/react-native-bindings.port.js +2 -0
  32. package/dist/core/ports/outbound/react-native-bindings.port.js.map +1 -0
  33. package/dist/core/services/chat.service.d.ts +56 -0
  34. package/dist/core/services/chat.service.d.ts.map +1 -0
  35. package/dist/core/services/chat.service.js +293 -0
  36. package/dist/core/services/chat.service.js.map +1 -0
  37. package/dist/core/session.d.ts +3 -0
  38. package/dist/core/session.d.ts.map +1 -1
  39. package/dist/core/session.js +10 -5
  40. package/dist/core/session.js.map +1 -1
  41. package/dist/core/types/chat.types.d.ts +157 -0
  42. package/dist/core/types/chat.types.d.ts.map +1 -0
  43. package/dist/core/types/chat.types.js +28 -0
  44. package/dist/core/types/chat.types.js.map +1 -0
  45. package/dist/core/types/service-adapters.types.d.ts +3 -2
  46. package/dist/core/types/service-adapters.types.d.ts.map +1 -1
  47. package/dist/index.d.ts +3 -1
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +2 -1
  50. package/dist/index.js.map +1 -1
  51. package/dist/react-native.d.ts +17 -0
  52. package/dist/react-native.d.ts.map +1 -0
  53. package/dist/react-native.js +17 -0
  54. package/dist/react-native.js.map +1 -0
  55. package/package.json +4 -4
@@ -0,0 +1,157 @@
1
+ import type { User } from './user.types';
2
+ /**
3
+ * Parameters for sending a chat message.
4
+ */
5
+ export interface ChatSendParams {
6
+ /** Message text content */
7
+ text: string;
8
+ /** Optional target user id for DM. Omit to broadcast to the whole room. */
9
+ to?: string;
10
+ /** Optional client-defined metadata */
11
+ metadata?: Record<string, unknown>;
12
+ }
13
+ /**
14
+ * Recipient of a chat operation — domain-level abstraction. Adapters translate
15
+ * this to their native targeting mechanism.
16
+ */
17
+ export type ChatRecipient = {
18
+ kind: 'room';
19
+ } | {
20
+ kind: 'user';
21
+ userId: string;
22
+ };
23
+ /**
24
+ * Wire-level outgoing message handed from ChatService to ChatAdapter.
25
+ * The adapter is responsible for serializing and transporting this.
26
+ */
27
+ export interface OutgoingChatMessage {
28
+ /** Client-generated id for dedup */
29
+ clientMsgId: string;
30
+ /** Sender (local) user id */
31
+ senderId: string;
32
+ /** Message text */
33
+ text: string;
34
+ /** Sender-side timestamp (ms since epoch) */
35
+ timestamp: number;
36
+ /** Optional DM target user id */
37
+ to?: string;
38
+ /** Optional client metadata */
39
+ metadata?: Record<string, unknown>;
40
+ }
41
+ /**
42
+ * Wire-level incoming message produced by ChatAdapter for ChatService.
43
+ * Adapter returns domain ids only — ChatService hydrates `from: User`.
44
+ */
45
+ export interface IncomingChatMessage {
46
+ clientMsgId: string;
47
+ senderId: string;
48
+ text: string;
49
+ timestamp: number;
50
+ to?: string;
51
+ metadata?: Record<string, unknown>;
52
+ }
53
+ /**
54
+ * Typing indicator state.
55
+ */
56
+ export interface TypingState {
57
+ senderId: string;
58
+ isTyping: boolean;
59
+ timestamp: number;
60
+ }
61
+ /**
62
+ * Host-only control commands carried over the chat control channel.
63
+ */
64
+ export type ChatControlCommand = {
65
+ type: 'MUTE_PARTICIPANT';
66
+ targetUserId: string;
67
+ timestamp: number;
68
+ } | {
69
+ type: 'UNMUTE_PARTICIPANT';
70
+ targetUserId: string;
71
+ timestamp: number;
72
+ } | {
73
+ type: 'MUTE_ROOM';
74
+ timestamp: number;
75
+ } | {
76
+ type: 'UNMUTE_ROOM';
77
+ timestamp: number;
78
+ };
79
+ /**
80
+ * Public event payloads.
81
+ */
82
+ export interface ChatMessageEvent {
83
+ from: User;
84
+ text: string;
85
+ to?: string;
86
+ timestamp: number;
87
+ metadata?: Record<string, unknown>;
88
+ }
89
+ export interface ChatTypingEvent {
90
+ userId: string;
91
+ isTyping: boolean;
92
+ timestamp: number;
93
+ }
94
+ export interface ChatMessageSendingEvent {
95
+ clientMsgId: string;
96
+ text: string;
97
+ to?: string;
98
+ timestamp: number;
99
+ }
100
+ export interface ChatMessageSentEvent {
101
+ clientMsgId: string;
102
+ timestamp: number;
103
+ }
104
+ export interface ChatMessageFailedEvent {
105
+ clientMsgId: string;
106
+ reason: 'timeout' | 'rate-limited' | 'muted' | 'unknown';
107
+ error: Error;
108
+ timestamp: number;
109
+ }
110
+ export interface ChatParticipantMutedEvent {
111
+ userId: string;
112
+ timestamp: number;
113
+ }
114
+ export interface ChatRoomMutedEvent {
115
+ timestamp: number;
116
+ }
117
+ /**
118
+ * Chat service event names.
119
+ */
120
+ export declare const ChatEvent: {
121
+ /** New message received (after dedup + mute filtering) */
122
+ readonly Message: "message";
123
+ /** Typing indicator changed for a remote participant */
124
+ readonly Typing: "typing";
125
+ /** Local send has started — UI may show a "sending..." state */
126
+ readonly MessageSending: "message-sending";
127
+ /** Local send completed successfully */
128
+ readonly MessageSent: "message-sent";
129
+ /** Local send failed (timeout, rate limit, network) */
130
+ readonly MessageFailed: "message-failed";
131
+ /** A participant was muted (by host) */
132
+ readonly ParticipantMuted: "participant-muted";
133
+ /** A participant was unmuted */
134
+ readonly ParticipantUnmuted: "participant-unmuted";
135
+ /** Entire room was muted by host */
136
+ readonly RoomMuted: "room-muted";
137
+ /** Room was unmuted */
138
+ readonly RoomUnmuted: "room-unmuted";
139
+ };
140
+ export type ChatEventName = (typeof ChatEvent)[keyof typeof ChatEvent];
141
+ export interface ChatEventMap {
142
+ [ChatEvent.Message]: (event: ChatMessageEvent) => void;
143
+ [ChatEvent.Typing]: (event: ChatTypingEvent) => void;
144
+ [ChatEvent.MessageSending]: (event: ChatMessageSendingEvent) => void;
145
+ [ChatEvent.MessageSent]: (event: ChatMessageSentEvent) => void;
146
+ [ChatEvent.MessageFailed]: (event: ChatMessageFailedEvent) => void;
147
+ [ChatEvent.ParticipantMuted]: (event: ChatParticipantMutedEvent) => void;
148
+ [ChatEvent.ParticipantUnmuted]: (event: ChatParticipantMutedEvent) => void;
149
+ [ChatEvent.RoomMuted]: (event: ChatRoomMutedEvent) => void;
150
+ [ChatEvent.RoomUnmuted]: (event: ChatRoomMutedEvent) => void;
151
+ }
152
+ export type ChatEventHandler = ChatEventMap[ChatEventName];
153
+ /** Client-side throttle: max messages per second per user */
154
+ export declare const CHAT_RATE_LIMIT_PER_SECOND = 5;
155
+ /** Send timeout — fail a send after this duration of network instability */
156
+ export declare const CHAT_SEND_TIMEOUT_MS = 5000;
157
+ //# sourceMappingURL=chat.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.types.d.ts","sourceRoot":"","sources":["../../../src/core/types/chat.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,2EAA2E;IAC3E,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAA;IACnB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAA;IACjB,iCAAiC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS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AAkB,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAA;IAC1E,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAC1D,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAA;CAC7D;AAED,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,aAAa,CAAC,CAAA;AAE1D,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,IAAI,CAAA;AAE3C,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,OAAO,CAAA"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Chat service event names.
3
+ */
4
+ export const ChatEvent = {
5
+ /** New message received (after dedup + mute filtering) */
6
+ Message: 'message',
7
+ /** Typing indicator changed for a remote participant */
8
+ Typing: 'typing',
9
+ /** Local send has started — UI may show a "sending..." state */
10
+ MessageSending: 'message-sending',
11
+ /** Local send completed successfully */
12
+ MessageSent: 'message-sent',
13
+ /** Local send failed (timeout, rate limit, network) */
14
+ MessageFailed: 'message-failed',
15
+ /** A participant was muted (by host) */
16
+ ParticipantMuted: 'participant-muted',
17
+ /** A participant was unmuted */
18
+ ParticipantUnmuted: 'participant-unmuted',
19
+ /** Entire room was muted by host */
20
+ RoomMuted: 'room-muted',
21
+ /** Room was unmuted */
22
+ RoomUnmuted: 'room-unmuted',
23
+ };
24
+ /** Client-side throttle: max messages per second per user */
25
+ export const CHAT_RATE_LIMIT_PER_SECOND = 5;
26
+ /** Send timeout — fail a send after this duration of network instability */
27
+ export const CHAT_SEND_TIMEOUT_MS = 5000;
28
+ //# sourceMappingURL=chat.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.types.js","sourceRoot":"","sources":["../../../src/core/types/chat.types.ts"],"names":[],"mappings":"AAqHA;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,0DAA0D;IAC1D,OAAO,EAAE,SAAS;IAClB,wDAAwD;IACxD,MAAM,EAAE,QAAQ;IAChB,gEAAgE;IAChE,cAAc,EAAE,iBAAiB;IACjC,wCAAwC;IACxC,WAAW,EAAE,cAAc;IAC3B,uDAAuD;IACvD,aAAa,EAAE,gBAAgB;IAC/B,wCAAwC;IACxC,gBAAgB,EAAE,mBAAmB;IACrC,gCAAgC;IAChC,kBAAkB,EAAE,qBAAqB;IACzC,oCAAoC;IACpC,SAAS,EAAE,YAAY;IACvB,uBAAuB;IACvB,WAAW,EAAE,cAAc;CACnB,CAAA;AAkBV,6DAA6D;AAC7D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAA;AAE3C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import type { StatsAdapter } from '../ports/outbound/stats-adapter.port';
2
2
  import type { RecordingAdapter } from '../ports/outbound/recording-adapter.port';
3
3
  import type { TrackAttachmentAdapter } from '../ports/outbound/track-attachment-adapter.port';
4
+ import type { ChatAdapter } from '../ports/outbound/chat-adapter.port';
4
5
  /**
5
6
  * Context for service adapters that need to call backend APIs.
6
7
  *
@@ -26,9 +27,9 @@ export interface ServiceAdapters {
26
27
  */
27
28
  stats: StatsAdapter;
28
29
  /**
29
- * Chat adapter (optional - Pro+ plans)
30
+ * Chat adapter (optional - requires "chat" feature)
30
31
  */
31
- chat?: unknown;
32
+ chat?: ChatAdapter;
32
33
  /**
33
34
  * Recording adapter (optional - requires "recording" feature + host/moderator role)
34
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"service-adapters.types.d.ts","sourceRoot":"","sources":["../../../src/core/types/service-adapters.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAA;AAE7F;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAA;IACpB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,YAAY,CAAA;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAE5B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;OAGG;IACH,eAAe,EAAE,sBAAsB,CAAA;CACxC"}
1
+ {"version":3,"file":"service-adapters.types.d.ts","sourceRoot":"","sources":["../../../src/core/types/service-adapters.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAA;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAEtE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAA;IACpB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,YAAY,CAAA;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAE5B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;OAGG;IACH,eAAe,EAAE,sBAAsB,CAAA;CACxC"}
package/dist/index.d.ts CHANGED
@@ -17,9 +17,11 @@ export { Provider } from './core/types/vroom.types';
17
17
  export { StatsEvent } from './core/types/stats.types';
18
18
  export { RecordingEvent } from './core/types/recording.types';
19
19
  export type { RecordingLayout, RecordingStartOptions, RecordingStatus, RecordingStatusEvent, RecordingState, } from './core/types/recording.types';
20
+ export { ChatEvent, CHAT_RATE_LIMIT_PER_SECOND, CHAT_SEND_TIMEOUT_MS, } from './core/types/chat.types';
21
+ export type { ChatSendParams, ChatMessageEvent, ChatTypingEvent, ChatMessageSendingEvent, ChatMessageSentEvent, ChatMessageFailedEvent, ChatParticipantMutedEvent, ChatRoomMutedEvent, } from './core/types/chat.types';
20
22
  export type { TrackAttachmentAdapter } from './core/ports/outbound/track-attachment-adapter.port';
21
23
  export type { ProviderAdapterFactory } from './core/ports/outbound/provider-adapter-factory.port';
22
- export { VroomError, BadRequestError, InvalidApiKeyError, UnauthorizedError, PlatformMismatchError, NetworkError, TimeoutError, ServiceError, PermissionDeniedError, UnsupportedFeatureError, RecordingStartError, NotFoundError, ConflictError, } from './core/errors/vroom.error';
24
+ export { VroomError, BadRequestError, InvalidApiKeyError, UnauthorizedError, PlatformMismatchError, NetworkError, TimeoutError, ServiceError, PermissionDeniedError, UnsupportedFeatureError, RecordingStartError, NotFoundError, ConflictError, ChatSendTimeoutError, ChatRateLimitedError, ChatMutedError, } from './core/errors/vroom.error';
23
25
  export { ErrorCodes } from './core/errors/error-codes';
24
26
  export type { ErrorCode } from './core/errors/error-codes';
25
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAI3D,OAAO,oBAAoB,CAAA;AAG3B,YAAY,EAAE,IAAI,EAAE,MAAM,yBAAyB,CA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BAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,aAAa,GACd,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,YAAY,EACV,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,YAAY,GACb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,SAAS,EACT,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAA;AACjG,YAAY,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAA;AAGjG,OAAO,EACL,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,GACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA"}
package/dist/index.js CHANGED
@@ -11,7 +11,8 @@ export { SessionEvent } from './core/types/events.types';
11
11
  export { Provider } from './core/types/vroom.types';
12
12
  export { StatsEvent } from './core/types/stats.types';
13
13
  export { RecordingEvent } from './core/types/recording.types';
14
+ export { ChatEvent, CHAT_RATE_LIMIT_PER_SECOND, CHAT_SEND_TIMEOUT_MS, } from './core/types/chat.types';
14
15
  // ============ Errors ============
15
- export { VroomError, BadRequestError, InvalidApiKeyError, UnauthorizedError, PlatformMismatchError, NetworkError, TimeoutError, ServiceError, PermissionDeniedError, UnsupportedFeatureError, RecordingStartError, NotFoundError, ConflictError, } from './core/errors/vroom.error';
16
+ export { VroomError, BadRequestError, InvalidApiKeyError, UnauthorizedError, PlatformMismatchError, NetworkError, TimeoutError, ServiceError, PermissionDeniedError, UnsupportedFeatureError, RecordingStartError, NotFoundError, ConflictError, ChatSendTimeoutError, ChatRateLimitedError, ChatMutedError, } from './core/errors/vroom.error';
16
17
  export { ErrorCodes } from './core/errors/error-codes';
17
18
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE3D,qCAAqC;AACrC,2CAA2C;AAC3C,OAAO,oBAAoB,CAAA;AAc3B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAQpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAoBrD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAOxD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAW7D,mCAAmC;AACnC,OAAO,EACL,UAAU,EACV,eAAe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+ /**
2
+ * SDK composition root for React Native.
3
+ *
4
+ * This file (and only this file) knows which provider adapter is active —
5
+ * it re-exports the active adapter's React Native bindings so consumers
6
+ * can import them via the provider-agnostic public subpath
7
+ * `@waitaya.buc/client-js/react-native`.
8
+ *
9
+ * Hexagonal rule: core code under `src/core/` MUST NOT import this file.
10
+ * The composition root is allowed to know the concrete adapter; the core
11
+ * is not.
12
+ *
13
+ * Swapping providers (e.g., LiveKit → Daily) is a build-time change to
14
+ * this single line — consumers do not need to update import paths.
15
+ */
16
+ export * from './adapters/livekit/react-native';
17
+ //# sourceMappingURL=react-native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,iCAAiC,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * SDK composition root for React Native.
3
+ *
4
+ * This file (and only this file) knows which provider adapter is active —
5
+ * it re-exports the active adapter's React Native bindings so consumers
6
+ * can import them via the provider-agnostic public subpath
7
+ * `@waitaya.buc/client-js/react-native`.
8
+ *
9
+ * Hexagonal rule: core code under `src/core/` MUST NOT import this file.
10
+ * The composition root is allowed to know the concrete adapter; the core
11
+ * is not.
12
+ *
13
+ * Swapping providers (e.g., LiveKit → Daily) is a build-time change to
14
+ * this single line — consumers do not need to update import paths.
15
+ */
16
+ export * from './adapters/livekit/react-native';
17
+ //# sourceMappingURL=react-native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-native.js","sourceRoot":"","sources":["../src/react-native.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,iCAAiC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waitaya.buc/client-js",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "Vroom Core SDK - Platform-agnostic RTC abstraction layer",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -13,9 +13,9 @@
13
13
  "default": "./dist/index.js"
14
14
  },
15
15
  "./react-native": {
16
- "types": "./dist/adapters/livekit/react-native.d.ts",
17
- "import": "./dist/adapters/livekit/react-native.js",
18
- "default": "./dist/adapters/livekit/react-native.js"
16
+ "types": "./dist/react-native.d.ts",
17
+ "import": "./dist/react-native.js",
18
+ "default": "./dist/react-native.js"
19
19
  }
20
20
  },
21
21
  "files": [