File tree Expand file tree Collapse file tree 8 files changed +13
-13
lines changed Expand file tree Collapse file tree 8 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ import {
2323 PersonaConfig ,
2424 StartSessionOptions ,
2525 StartSessionResponse ,
26+ ConnectionClosedCode ,
2627} from './types' ;
2728import { TalkMessageStream } from './types/TalkMessageStream' ;
2829import { Buffer } from 'buffer' ;
29- import { ConnectionClosedCode } from './lib/constants' ;
3030export default class AnamClient {
3131 private publicEventEmitter : PublicEventEmitter ;
3232 private internalEventEmitter : InternalEventEmitter ;
Original file line number Diff line number Diff line change @@ -6,15 +6,6 @@ export const DEFAULT_HEADERS = {
66export const DEFAULT_API_BASE_URL = 'https://api.anam.ai' ;
77export const DEFAULT_API_VERSION = '/v1' ; // include the leading slash
88
9- // Connection closed codes
10- export enum ConnectionClosedCode {
11- NORMAL = 'CONNECTION_CLOSED_CODE_NORMAL' ,
12- MICROPHONE_PERMISSION_DENIED = 'CONNECTION_CLOSED_CODE_MICROPHONE_PERMISSION_DENIED' ,
13- SIGNALLING_CLIENT_CONNECTION_FAILURE = 'CONNECTION_CLOSED_CODE_SIGNALLING_CLIENT_CONNECTION_FAILURE' ,
14- WEBRTC_FAILURE = 'CONNECTION_CLOSED_CODE_WEBRTC_FAILURE' ,
15- SERVER_CLOSED_CONNECTION = 'CONNECTION_CLOSED_CODE_SERVER_CLOSED_CONNECTION' ,
16- }
17-
189export const CLIENT_METADATA = {
1910 client : 'js-sdk' ,
2011 version : '0.0.0-automated' ,
Original file line number Diff line number Diff line change 1- import { ConnectionClosedCode } from '../lib/constants' ;
21import { InternalEventEmitter , PublicEventEmitter } from '.' ;
32import {
43 AnamEvent ,
54 InternalEvent ,
65 SignalMessage ,
76 SignalMessageAction ,
87 SignallingClientOptions ,
8+ ConnectionClosedCode ,
99} from '../types' ;
1010import { TalkMessageStreamPayload } from '../types/signalling/TalkMessageStreamPayload' ;
1111
Original file line number Diff line number Diff line change 1- import { ConnectionClosedCode } from '../lib/constants' ;
21import {
32 EngineApiRestClient ,
43 InternalEventEmitter ,
@@ -13,6 +12,7 @@ import {
1312 SignalMessageAction ,
1413 StreamingClientOptions ,
1514 WebRtcTextMessageEvent ,
15+ ConnectionClosedCode ,
1616} from '../types' ;
1717import { TalkMessageStream } from '../types/TalkMessageStream' ;
1818import { TalkStreamInterruptedSignalMessage } from '../types/signalling/TalkStreamInterruptedSignalMessage' ;
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ export type { EventCallbacks } from './public/EventCallbacks';
33export { InternalEvent } from './internal/InternalEvent' ;
44export type { InternalEventCallbacks } from './internal/InternalEventCallbacks' ;
55export type { EventCallback } from './EventCallback' ;
6+ export { ConnectionClosedCode } from './public/ConnectionClosedCodes' ;
Original file line number Diff line number Diff line change 1+ export enum ConnectionClosedCode {
2+ NORMAL = 'CONNECTION_CLOSED_CODE_NORMAL' ,
3+ MICROPHONE_PERMISSION_DENIED = 'CONNECTION_CLOSED_CODE_MICROPHONE_PERMISSION_DENIED' ,
4+ SIGNALLING_CLIENT_CONNECTION_FAILURE = 'CONNECTION_CLOSED_CODE_SIGNALLING_CLIENT_CONNECTION_FAILURE' ,
5+ WEBRTC_FAILURE = 'CONNECTION_CLOSED_CODE_WEBRTC_FAILURE' ,
6+ SERVER_CLOSED_CONNECTION = 'CONNECTION_CLOSED_CODE_SERVER_CLOSED_CONNECTION' ,
7+ }
Original file line number Diff line number Diff line change 1- import { ConnectionClosedCode } from '../../../lib/constants ' ;
1+ import { ConnectionClosedCode } from './ConnectionClosedCodes ' ;
22import { Message , MessageStreamEvent , AnamEvent } from '../../index' ;
33
44export type EventCallbacks = {
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ export { MessageRole } from './messageHistory'; // need to export this explicitl
1010export type * from './events' ;
1111export { AnamEvent } from './events' ; // need to export this explicitly to avoid enum import issues
1212export { InternalEvent } from './events' ; // need to export this explicitly to avoid enum import issues
13+ export { ConnectionClosedCode } from './events' ; // need to export this explicitly to avoid enum import issues
You can’t perform that action at this time.
0 commit comments