@elevenlabs/elevenlabs-js 2.23.0 → 2.24.1

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 (89) hide show
  1. package/Client.js +2 -2
  2. package/README.md +3 -3
  3. package/api/resources/conversationalAi/resources/conversations/client/Client.js +17 -1
  4. package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +4 -0
  5. package/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +13 -0
  6. package/api/resources/conversationalAi/resources/mcpServers/client/Client.js +64 -0
  7. package/api/types/AsrProvider.d.ts +5 -1
  8. package/api/types/AsrProvider.js +5 -0
  9. package/api/types/ConversationSummaryResponseModel.d.ts +1 -0
  10. package/api/types/ProjectExtendedResponse.d.ts +2 -0
  11. package/api/types/ProjectVoiceResponseModel.d.ts +11 -0
  12. package/api/types/ProjectVoiceResponseModel.js +3 -0
  13. package/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  14. package/api/types/WebhookToolApiSchemaConfigInputContentType.d.ts +6 -0
  15. package/api/types/WebhookToolApiSchemaConfigInputContentType.js +9 -0
  16. package/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  17. package/api/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +6 -0
  18. package/api/types/WebhookToolApiSchemaConfigOutputContentType.js +9 -0
  19. package/api/types/index.d.ts +3 -0
  20. package/api/types/index.js +3 -0
  21. package/dist/Client.js +2 -2
  22. package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +17 -1
  23. package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +4 -0
  24. package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +13 -0
  25. package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.js +64 -0
  26. package/dist/api/types/AsrProvider.d.ts +5 -1
  27. package/dist/api/types/AsrProvider.js +5 -0
  28. package/dist/api/types/ConversationSummaryResponseModel.d.ts +1 -0
  29. package/dist/api/types/ProjectExtendedResponse.d.ts +2 -0
  30. package/dist/api/types/ProjectVoiceResponseModel.d.ts +11 -0
  31. package/dist/api/types/ProjectVoiceResponseModel.js +3 -0
  32. package/dist/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  33. package/dist/api/types/WebhookToolApiSchemaConfigInputContentType.d.ts +6 -0
  34. package/dist/api/types/WebhookToolApiSchemaConfigInputContentType.js +9 -0
  35. package/dist/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  36. package/dist/api/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +6 -0
  37. package/dist/api/types/WebhookToolApiSchemaConfigOutputContentType.js +9 -0
  38. package/dist/api/types/index.d.ts +3 -0
  39. package/dist/api/types/index.js +3 -0
  40. package/dist/serialization/types/AsrProvider.d.ts +1 -1
  41. package/dist/serialization/types/AsrProvider.js +1 -1
  42. package/dist/serialization/types/ConversationSummaryResponseModel.d.ts +1 -0
  43. package/dist/serialization/types/ConversationSummaryResponseModel.js +1 -0
  44. package/dist/serialization/types/ProjectExtendedResponse.d.ts +2 -0
  45. package/dist/serialization/types/ProjectExtendedResponse.js +2 -0
  46. package/dist/serialization/types/ProjectVoiceResponseModel.d.ts +17 -0
  47. package/dist/serialization/types/ProjectVoiceResponseModel.js +49 -0
  48. package/dist/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  49. package/dist/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
  50. package/dist/serialization/types/WebhookToolApiSchemaConfigInputContentType.d.ts +7 -0
  51. package/dist/serialization/types/WebhookToolApiSchemaConfigInputContentType.js +39 -0
  52. package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  53. package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
  54. package/dist/serialization/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +7 -0
  55. package/dist/serialization/types/WebhookToolApiSchemaConfigOutputContentType.js +39 -0
  56. package/dist/serialization/types/index.d.ts +3 -0
  57. package/dist/serialization/types/index.js +3 -0
  58. package/dist/version.d.ts +1 -1
  59. package/dist/version.js +1 -1
  60. package/dist/wrapper/realtime/connection.d.ts +18 -1
  61. package/dist/wrapper/realtime/connection.js +13 -0
  62. package/dist/wrapper/realtime/scribe.d.ts +5 -0
  63. package/dist/wrapper/realtime/scribe.js +3 -0
  64. package/package.json +1 -1
  65. package/reference.md +63 -0
  66. package/serialization/types/AsrProvider.d.ts +1 -1
  67. package/serialization/types/AsrProvider.js +1 -1
  68. package/serialization/types/ConversationSummaryResponseModel.d.ts +1 -0
  69. package/serialization/types/ConversationSummaryResponseModel.js +1 -0
  70. package/serialization/types/ProjectExtendedResponse.d.ts +2 -0
  71. package/serialization/types/ProjectExtendedResponse.js +2 -0
  72. package/serialization/types/ProjectVoiceResponseModel.d.ts +17 -0
  73. package/serialization/types/ProjectVoiceResponseModel.js +49 -0
  74. package/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  75. package/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
  76. package/serialization/types/WebhookToolApiSchemaConfigInputContentType.d.ts +7 -0
  77. package/serialization/types/WebhookToolApiSchemaConfigInputContentType.js +39 -0
  78. package/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  79. package/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
  80. package/serialization/types/WebhookToolApiSchemaConfigOutputContentType.d.ts +7 -0
  81. package/serialization/types/WebhookToolApiSchemaConfigOutputContentType.js +39 -0
  82. package/serialization/types/index.d.ts +3 -0
  83. package/serialization/types/index.js +3 -0
  84. package/version.d.ts +1 -1
  85. package/version.js +1 -1
  86. package/wrapper/realtime/connection.d.ts +18 -1
  87. package/wrapper/realtime/connection.js +13 -0
  88. package/wrapper/realtime/scribe.d.ts +5 -0
  89. package/wrapper/realtime/scribe.js +3 -0
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ProjectVoiceResponseModel = void 0;
38
+ const core = __importStar(require("../../core"));
39
+ exports.ProjectVoiceResponseModel = core.serialization.object({
40
+ voiceId: core.serialization.property("voice_id", core.serialization.string()),
41
+ alias: core.serialization.string(),
42
+ stability: core.serialization.number(),
43
+ similarityBoost: core.serialization.property("similarity_boost", core.serialization.number()),
44
+ style: core.serialization.number(),
45
+ isPinned: core.serialization.property("is_pinned", core.serialization.boolean()),
46
+ useSpeakerBoost: core.serialization.property("use_speaker_boost", core.serialization.boolean()),
47
+ volumeGain: core.serialization.property("volume_gain", core.serialization.number()),
48
+ speed: core.serialization.number(),
49
+ });
@@ -5,6 +5,7 @@ import { WebhookToolApiSchemaConfigInputMethod } from "./WebhookToolApiSchemaCon
5
5
  import { LiteralJsonSchemaProperty } from "./LiteralJsonSchemaProperty";
6
6
  import { QueryParamsJsonSchema } from "./QueryParamsJsonSchema";
7
7
  import { WebhookToolApiSchemaConfigInputRequestHeadersValue } from "./WebhookToolApiSchemaConfigInputRequestHeadersValue";
8
+ import { WebhookToolApiSchemaConfigInputContentType } from "./WebhookToolApiSchemaConfigInputContentType";
8
9
  import { AuthConnectionLocator } from "./AuthConnectionLocator";
9
10
  export declare const WebhookToolApiSchemaConfigInput: core.serialization.ObjectSchema<serializers.WebhookToolApiSchemaConfigInput.Raw, ElevenLabs.WebhookToolApiSchemaConfigInput>;
10
11
  export declare namespace WebhookToolApiSchemaConfigInput {
@@ -15,6 +16,7 @@ export declare namespace WebhookToolApiSchemaConfigInput {
15
16
  query_params_schema?: QueryParamsJsonSchema.Raw | null;
16
17
  request_body_schema?: serializers.ObjectJsonSchemaPropertyInput.Raw | null;
17
18
  request_headers?: Record<string, WebhookToolApiSchemaConfigInputRequestHeadersValue.Raw> | null;
19
+ content_type?: WebhookToolApiSchemaConfigInputContentType.Raw | null;
18
20
  auth_connection?: AuthConnectionLocator.Raw | null;
19
21
  }
20
22
  }
@@ -41,6 +41,7 @@ const WebhookToolApiSchemaConfigInputMethod_1 = require("./WebhookToolApiSchemaC
41
41
  const LiteralJsonSchemaProperty_1 = require("./LiteralJsonSchemaProperty");
42
42
  const QueryParamsJsonSchema_1 = require("./QueryParamsJsonSchema");
43
43
  const WebhookToolApiSchemaConfigInputRequestHeadersValue_1 = require("./WebhookToolApiSchemaConfigInputRequestHeadersValue");
44
+ const WebhookToolApiSchemaConfigInputContentType_1 = require("./WebhookToolApiSchemaConfigInputContentType");
44
45
  const AuthConnectionLocator_1 = require("./AuthConnectionLocator");
45
46
  exports.WebhookToolApiSchemaConfigInput = core.serialization.object({
46
47
  url: core.serialization.string(),
@@ -51,5 +52,6 @@ exports.WebhookToolApiSchemaConfigInput = core.serialization.object({
51
52
  requestHeaders: core.serialization.property("request_headers", core.serialization
52
53
  .record(core.serialization.string(), WebhookToolApiSchemaConfigInputRequestHeadersValue_1.WebhookToolApiSchemaConfigInputRequestHeadersValue)
53
54
  .optional()),
55
+ contentType: core.serialization.property("content_type", WebhookToolApiSchemaConfigInputContentType_1.WebhookToolApiSchemaConfigInputContentType.optional()),
54
56
  authConnection: core.serialization.property("auth_connection", AuthConnectionLocator_1.AuthConnectionLocator.optional()),
55
57
  });
@@ -0,0 +1,7 @@
1
+ import * as serializers from "../index";
2
+ import * as ElevenLabs from "../../api/index";
3
+ import * as core from "../../core";
4
+ export declare const WebhookToolApiSchemaConfigInputContentType: core.serialization.Schema<serializers.WebhookToolApiSchemaConfigInputContentType.Raw, ElevenLabs.WebhookToolApiSchemaConfigInputContentType>;
5
+ export declare namespace WebhookToolApiSchemaConfigInputContentType {
6
+ type Raw = "application/json" | "application/x-www-form-urlencoded";
7
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.WebhookToolApiSchemaConfigInputContentType = void 0;
38
+ const core = __importStar(require("../../core"));
39
+ exports.WebhookToolApiSchemaConfigInputContentType = core.serialization.enum_(["application/json", "application/x-www-form-urlencoded"]);
@@ -5,6 +5,7 @@ import { WebhookToolApiSchemaConfigOutputMethod } from "./WebhookToolApiSchemaCo
5
5
  import { LiteralJsonSchemaProperty } from "./LiteralJsonSchemaProperty";
6
6
  import { QueryParamsJsonSchema } from "./QueryParamsJsonSchema";
7
7
  import { WebhookToolApiSchemaConfigOutputRequestHeadersValue } from "./WebhookToolApiSchemaConfigOutputRequestHeadersValue";
8
+ import { WebhookToolApiSchemaConfigOutputContentType } from "./WebhookToolApiSchemaConfigOutputContentType";
8
9
  import { AuthConnectionLocator } from "./AuthConnectionLocator";
9
10
  export declare const WebhookToolApiSchemaConfigOutput: core.serialization.ObjectSchema<serializers.WebhookToolApiSchemaConfigOutput.Raw, ElevenLabs.WebhookToolApiSchemaConfigOutput>;
10
11
  export declare namespace WebhookToolApiSchemaConfigOutput {
@@ -15,6 +16,7 @@ export declare namespace WebhookToolApiSchemaConfigOutput {
15
16
  query_params_schema?: QueryParamsJsonSchema.Raw | null;
16
17
  request_body_schema?: serializers.ObjectJsonSchemaPropertyOutput.Raw | null;
17
18
  request_headers?: Record<string, WebhookToolApiSchemaConfigOutputRequestHeadersValue.Raw> | null;
19
+ content_type?: WebhookToolApiSchemaConfigOutputContentType.Raw | null;
18
20
  auth_connection?: AuthConnectionLocator.Raw | null;
19
21
  }
20
22
  }
@@ -41,6 +41,7 @@ const WebhookToolApiSchemaConfigOutputMethod_1 = require("./WebhookToolApiSchema
41
41
  const LiteralJsonSchemaProperty_1 = require("./LiteralJsonSchemaProperty");
42
42
  const QueryParamsJsonSchema_1 = require("./QueryParamsJsonSchema");
43
43
  const WebhookToolApiSchemaConfigOutputRequestHeadersValue_1 = require("./WebhookToolApiSchemaConfigOutputRequestHeadersValue");
44
+ const WebhookToolApiSchemaConfigOutputContentType_1 = require("./WebhookToolApiSchemaConfigOutputContentType");
44
45
  const AuthConnectionLocator_1 = require("./AuthConnectionLocator");
45
46
  exports.WebhookToolApiSchemaConfigOutput = core.serialization.object({
46
47
  url: core.serialization.string(),
@@ -51,5 +52,6 @@ exports.WebhookToolApiSchemaConfigOutput = core.serialization.object({
51
52
  requestHeaders: core.serialization.property("request_headers", core.serialization
52
53
  .record(core.serialization.string(), WebhookToolApiSchemaConfigOutputRequestHeadersValue_1.WebhookToolApiSchemaConfigOutputRequestHeadersValue)
53
54
  .optional()),
55
+ contentType: core.serialization.property("content_type", WebhookToolApiSchemaConfigOutputContentType_1.WebhookToolApiSchemaConfigOutputContentType.optional()),
54
56
  authConnection: core.serialization.property("auth_connection", AuthConnectionLocator_1.AuthConnectionLocator.optional()),
55
57
  });
@@ -0,0 +1,7 @@
1
+ import * as serializers from "../index";
2
+ import * as ElevenLabs from "../../api/index";
3
+ import * as core from "../../core";
4
+ export declare const WebhookToolApiSchemaConfigOutputContentType: core.serialization.Schema<serializers.WebhookToolApiSchemaConfigOutputContentType.Raw, ElevenLabs.WebhookToolApiSchemaConfigOutputContentType>;
5
+ export declare namespace WebhookToolApiSchemaConfigOutputContentType {
6
+ type Raw = "application/json" | "application/x-www-form-urlencoded";
7
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.WebhookToolApiSchemaConfigOutputContentType = void 0;
38
+ const core = __importStar(require("../../core"));
39
+ exports.WebhookToolApiSchemaConfigOutputContentType = core.serialization.enum_(["application/json", "application/x-www-form-urlencoded"]);
@@ -516,6 +516,7 @@ export * from "./ProjectSnapshotResponse";
516
516
  export * from "./ProjectSnapshotsResponse";
517
517
  export * from "./ProjectVideoResponseModel";
518
518
  export * from "./ProjectVideoThumbnailSheetResponseModel";
519
+ export * from "./ProjectVoiceResponseModel";
519
520
  export * from "./PromptAgentApiModelInputBackupLlmConfig";
520
521
  export * from "./PromptAgentApiModelInputToolsItem";
521
522
  export * from "./PromptAgentApiModelInput";
@@ -737,9 +738,11 @@ export * from "./WebhookAuthMethodType";
737
738
  export * from "./WebhookEventType";
738
739
  export * from "./WebhookToolApiSchemaConfigInputMethod";
739
740
  export * from "./WebhookToolApiSchemaConfigInputRequestHeadersValue";
741
+ export * from "./WebhookToolApiSchemaConfigInputContentType";
740
742
  export * from "./WebhookToolApiSchemaConfigInput";
741
743
  export * from "./WebhookToolApiSchemaConfigOutputMethod";
742
744
  export * from "./WebhookToolApiSchemaConfigOutputRequestHeadersValue";
745
+ export * from "./WebhookToolApiSchemaConfigOutputContentType";
743
746
  export * from "./WebhookToolApiSchemaConfigOutput";
744
747
  export * from "./WebhookToolConfigInput";
745
748
  export * from "./WebhookToolConfigOutput";
@@ -532,6 +532,7 @@ __exportStar(require("./ProjectSnapshotResponse"), exports);
532
532
  __exportStar(require("./ProjectSnapshotsResponse"), exports);
533
533
  __exportStar(require("./ProjectVideoResponseModel"), exports);
534
534
  __exportStar(require("./ProjectVideoThumbnailSheetResponseModel"), exports);
535
+ __exportStar(require("./ProjectVoiceResponseModel"), exports);
535
536
  __exportStar(require("./PromptAgentApiModelInputBackupLlmConfig"), exports);
536
537
  __exportStar(require("./PromptAgentApiModelInputToolsItem"), exports);
537
538
  __exportStar(require("./PromptAgentApiModelInput"), exports);
@@ -753,9 +754,11 @@ __exportStar(require("./WebhookAuthMethodType"), exports);
753
754
  __exportStar(require("./WebhookEventType"), exports);
754
755
  __exportStar(require("./WebhookToolApiSchemaConfigInputMethod"), exports);
755
756
  __exportStar(require("./WebhookToolApiSchemaConfigInputRequestHeadersValue"), exports);
757
+ __exportStar(require("./WebhookToolApiSchemaConfigInputContentType"), exports);
756
758
  __exportStar(require("./WebhookToolApiSchemaConfigInput"), exports);
757
759
  __exportStar(require("./WebhookToolApiSchemaConfigOutputMethod"), exports);
758
760
  __exportStar(require("./WebhookToolApiSchemaConfigOutputRequestHeadersValue"), exports);
761
+ __exportStar(require("./WebhookToolApiSchemaConfigOutputContentType"), exports);
759
762
  __exportStar(require("./WebhookToolApiSchemaConfigOutput"), exports);
760
763
  __exportStar(require("./WebhookToolConfigInput"), exports);
761
764
  __exportStar(require("./WebhookToolConfigOutput"), exports);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v2.23.0";
1
+ export declare const SDK_VERSION = "v2.24.0";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "v2.23.0";
4
+ exports.SDK_VERSION = "v2.24.0";
@@ -28,6 +28,7 @@ export interface Config {
28
28
  min_silence_duration_ms?: number;
29
29
  model_id?: string;
30
30
  disable_logging?: boolean;
31
+ include_timestamps?: boolean;
31
32
  }
32
33
  export interface SessionStartedMessage {
33
34
  message_type: "session_started";
@@ -48,7 +49,19 @@ export interface CommittedTranscriptWithTimestampsMessage {
48
49
  language_code?: string;
49
50
  words?: WordsItem[];
50
51
  }
51
- export type WebSocketMessage = SessionStartedMessage | PartialTranscriptMessage | CommittedTranscriptMessage | CommittedTranscriptWithTimestampsMessage;
52
+ export interface ErrorMessage {
53
+ message_type: "error";
54
+ error: string;
55
+ }
56
+ export interface AuthErrorMessage {
57
+ message_type: "auth_error";
58
+ error: string;
59
+ }
60
+ export interface QuotaExceededErrorMessage {
61
+ message_type: "quota_exceeded";
62
+ error: string;
63
+ }
64
+ export type WebSocketMessage = SessionStartedMessage | PartialTranscriptMessage | CommittedTranscriptMessage | CommittedTranscriptWithTimestampsMessage | ErrorMessage | AuthErrorMessage | QuotaExceededErrorMessage;
52
65
  /**
53
66
  * Events emitted by the RealtimeConnection.
54
67
  */
@@ -63,6 +76,10 @@ export declare enum RealtimeEvents {
63
76
  COMMITTED_TRANSCRIPT_WITH_TIMESTAMPS = "committed_transcript_with_timestamps",
64
77
  /** Emitted when an error occurs */
65
78
  ERROR = "error",
79
+ /** Emitted when an auth error occurs */
80
+ AUTH_ERROR = "auth_error",
81
+ /** Emitted when a quota exceeded error occurs */
82
+ QUOTA_EXCEEDED = "quota_exceeded",
66
83
  /** Emitted when the WebSocket connection is opened */
67
84
  OPEN = "open",
68
85
  /** Emitted when the WebSocket connection is closed */
@@ -21,6 +21,10 @@ var RealtimeEvents;
21
21
  RealtimeEvents["COMMITTED_TRANSCRIPT_WITH_TIMESTAMPS"] = "committed_transcript_with_timestamps";
22
22
  /** Emitted when an error occurs */
23
23
  RealtimeEvents["ERROR"] = "error";
24
+ /** Emitted when an auth error occurs */
25
+ RealtimeEvents["AUTH_ERROR"] = "auth_error";
26
+ /** Emitted when a quota exceeded error occurs */
27
+ RealtimeEvents["QUOTA_EXCEEDED"] = "quota_exceeded";
24
28
  /** Emitted when the WebSocket connection is opened */
25
29
  RealtimeEvents["OPEN"] = "open";
26
30
  /** Emitted when the WebSocket connection is closed */
@@ -99,6 +103,15 @@ class RealtimeConnection {
99
103
  case "committed_transcript_with_timestamps":
100
104
  this.eventEmitter.emit(RealtimeEvents.COMMITTED_TRANSCRIPT_WITH_TIMESTAMPS, data);
101
105
  break;
106
+ case "error":
107
+ this.eventEmitter.emit(RealtimeEvents.ERROR, data);
108
+ break;
109
+ case "auth_error":
110
+ this.eventEmitter.emit(RealtimeEvents.AUTH_ERROR, data);
111
+ break;
112
+ case "quota_exceeded":
113
+ this.eventEmitter.emit(RealtimeEvents.QUOTA_EXCEEDED, data);
114
+ break;
102
115
  }
103
116
  });
104
117
  this.websocket.on("error", (error) => {
@@ -49,6 +49,11 @@ interface BaseOptions {
49
49
  * Can sometimes improve transcription performance if known beforehand.
50
50
  */
51
51
  languageCode?: string;
52
+ /**
53
+ * Whether to receive a committed_transcript_with_timestamps event which includes word-level timestamps.
54
+ * @default false
55
+ */
56
+ includeTimestamps?: boolean;
52
57
  }
53
58
  export interface AudioOptions extends BaseOptions {
54
59
  audioFormat: AudioFormat;
@@ -136,6 +136,9 @@ class ScribeRealtime {
136
136
  if (options.languageCode !== undefined) {
137
137
  params.append("language_code", options.languageCode);
138
138
  }
139
+ if (options.includeTimestamps !== undefined) {
140
+ params.append("include_timestamps", options.includeTimestamps.toString());
141
+ }
139
142
  const queryString = params.toString();
140
143
  return queryString ? `${baseUri}?${queryString}` : baseUri;
141
144
  });