@cartesia/cartesia-js 2.1.4 → 2.1.6
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/Client.d.ts +10 -6
- package/api/resources/apiStatus/client/Client.d.ts +4 -0
- package/api/resources/apiStatus/client/Client.js +21 -11
- package/api/resources/datasets/client/Client.d.ts +6 -6
- package/api/resources/datasets/client/Client.js +36 -29
- package/api/resources/datasets/client/requests/UploadDatasetFileRequest.d.ts +0 -4
- package/api/resources/datasets/types/FilePurpose.d.ts +1 -1
- package/api/resources/embedding/types/Embedding.d.ts +1 -1
- package/api/resources/index.js +17 -7
- package/api/resources/infill/client/Client.d.ts +14 -1
- package/api/resources/infill/client/Client.js +52 -23
- package/api/resources/infill/client/requests/InfillBytesRequest.d.ts +7 -3
- package/api/resources/tts/client/Client.js +21 -11
- package/api/resources/tts/types/ContextId.d.ts +1 -1
- package/api/resources/tts/types/Emotion.d.ts +1 -1
- package/api/resources/tts/types/FlushId.d.ts +9 -0
- package/api/resources/tts/types/FlushId.js +5 -0
- package/api/resources/tts/types/GenerationRequest.d.ts +5 -2
- package/api/resources/tts/types/NaturalSpecifier.d.ts +1 -1
- package/api/resources/tts/types/NumericalSpecifier.d.ts +1 -1
- package/api/resources/tts/types/OutputFormat.d.ts +1 -1
- package/api/resources/tts/types/RawEncoding.d.ts +1 -1
- package/api/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/api/resources/tts/types/Speed.d.ts +1 -1
- package/api/resources/tts/types/SupportedLanguage.d.ts +1 -1
- package/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +1 -1
- package/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +8 -0
- package/api/resources/tts/types/WebSocketFlushDoneResponse.js +5 -0
- package/api/resources/tts/types/WebSocketRequest.d.ts +1 -1
- package/api/resources/tts/types/WebSocketResponse.d.ts +4 -1
- package/api/resources/tts/types/WebSocketTtsOutput.d.ts +2 -0
- package/api/resources/tts/types/index.d.ts +2 -0
- package/api/resources/tts/types/index.js +2 -0
- package/api/resources/voiceChanger/client/Client.d.ts +3 -4
- package/api/resources/voiceChanger/client/Client.js +23 -13
- package/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +1 -1
- package/api/resources/voiceChanger/types/StreamingResponse.d.ts +1 -1
- package/api/resources/voices/client/Client.d.ts +48 -39
- package/api/resources/voices/client/Client.js +114 -98
- package/api/resources/voices/types/BaseVoiceId.d.ts +2 -2
- package/api/resources/voices/types/CloneMode.d.ts +1 -1
- package/api/resources/voices/types/CreateVoiceRequest.d.ts +1 -0
- package/api/resources/voices/types/Gender.d.ts +1 -1
- package/api/resources/voices/types/LocalizeDialect.d.ts +12 -4
- package/api/resources/voices/types/LocalizeEnglishDialect.d.ts +1 -1
- package/api/resources/voices/types/LocalizePortugueseDialect.d.ts +8 -0
- package/api/resources/voices/types/LocalizePortugueseDialect.js +10 -0
- package/api/resources/voices/types/LocalizeSpanishDialect.d.ts +8 -0
- package/api/resources/voices/types/LocalizeSpanishDialect.js +10 -0
- package/api/resources/voices/types/LocalizeTargetLanguage.d.ts +1 -1
- package/api/resources/voices/types/MixVoiceSpecifier.d.ts +1 -1
- package/api/resources/voices/types/VoiceId.d.ts +1 -1
- package/api/resources/voices/types/Weight.d.ts +1 -1
- package/api/resources/voices/types/index.d.ts +2 -0
- package/api/resources/voices/types/index.js +2 -0
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +2 -2
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +5 -5
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +4 -5
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/core/form-data-utils/FormDataWrapper.js +22 -12
- package/core/index.js +17 -7
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +7 -5
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +22 -19
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +31 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +16 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +2 -4
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/core/streaming-fetcher/Stream.d.ts +0 -1
- package/core/streaming-fetcher/Stream.js +20 -21
- package/core/websocket/ws.d.ts +7 -7
- package/core/websocket/ws.js +17 -7
- package/dist/Client.d.ts +10 -6
- package/dist/api/resources/apiStatus/client/Client.d.ts +4 -0
- package/dist/api/resources/apiStatus/client/Client.js +21 -11
- package/dist/api/resources/datasets/client/Client.d.ts +6 -6
- package/dist/api/resources/datasets/client/Client.js +36 -29
- package/dist/api/resources/datasets/client/requests/UploadDatasetFileRequest.d.ts +0 -4
- package/dist/api/resources/datasets/types/FilePurpose.d.ts +1 -1
- package/dist/api/resources/embedding/types/Embedding.d.ts +1 -1
- package/dist/api/resources/index.js +17 -7
- package/dist/api/resources/infill/client/Client.d.ts +14 -1
- package/dist/api/resources/infill/client/Client.js +52 -23
- package/dist/api/resources/infill/client/requests/InfillBytesRequest.d.ts +7 -3
- package/dist/api/resources/tts/client/Client.js +21 -11
- package/dist/api/resources/tts/types/ContextId.d.ts +1 -1
- package/dist/api/resources/tts/types/Emotion.d.ts +1 -1
- package/dist/api/resources/tts/types/FlushId.d.ts +9 -0
- package/dist/api/resources/tts/types/FlushId.js +5 -0
- package/dist/api/resources/tts/types/GenerationRequest.d.ts +5 -2
- package/dist/api/resources/tts/types/NaturalSpecifier.d.ts +1 -1
- package/dist/api/resources/tts/types/NumericalSpecifier.d.ts +1 -1
- package/dist/api/resources/tts/types/OutputFormat.d.ts +1 -1
- package/dist/api/resources/tts/types/RawEncoding.d.ts +1 -1
- package/dist/api/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/dist/api/resources/tts/types/Speed.d.ts +1 -1
- package/dist/api/resources/tts/types/SupportedLanguage.d.ts +1 -1
- package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.d.ts +1 -1
- package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.d.ts +8 -0
- package/dist/api/resources/tts/types/WebSocketFlushDoneResponse.js +5 -0
- package/dist/api/resources/tts/types/WebSocketRequest.d.ts +1 -1
- package/dist/api/resources/tts/types/WebSocketResponse.d.ts +4 -1
- package/dist/api/resources/tts/types/WebSocketTtsOutput.d.ts +2 -0
- package/dist/api/resources/tts/types/index.d.ts +2 -0
- package/dist/api/resources/tts/types/index.js +2 -0
- package/dist/api/resources/voiceChanger/client/Client.d.ts +3 -4
- package/dist/api/resources/voiceChanger/client/Client.js +23 -13
- package/dist/api/resources/voiceChanger/types/OutputFormatContainer.d.ts +1 -1
- package/dist/api/resources/voiceChanger/types/StreamingResponse.d.ts +1 -1
- package/dist/api/resources/voices/client/Client.d.ts +48 -39
- package/dist/api/resources/voices/client/Client.js +114 -98
- package/dist/api/resources/voices/types/BaseVoiceId.d.ts +2 -2
- package/dist/api/resources/voices/types/CloneMode.d.ts +1 -1
- package/dist/api/resources/voices/types/CreateVoiceRequest.d.ts +1 -0
- package/dist/api/resources/voices/types/Gender.d.ts +1 -1
- package/dist/api/resources/voices/types/LocalizeDialect.d.ts +12 -4
- package/dist/api/resources/voices/types/LocalizeEnglishDialect.d.ts +1 -1
- package/dist/api/resources/voices/types/LocalizePortugueseDialect.d.ts +8 -0
- package/dist/api/resources/voices/types/LocalizePortugueseDialect.js +10 -0
- package/dist/api/resources/voices/types/LocalizeSpanishDialect.d.ts +8 -0
- package/dist/api/resources/voices/types/LocalizeSpanishDialect.js +10 -0
- package/dist/api/resources/voices/types/LocalizeTargetLanguage.d.ts +1 -1
- package/dist/api/resources/voices/types/MixVoiceSpecifier.d.ts +1 -1
- package/dist/api/resources/voices/types/VoiceId.d.ts +1 -1
- package/dist/api/resources/voices/types/Weight.d.ts +1 -1
- package/dist/api/resources/voices/types/index.d.ts +2 -0
- package/dist/api/resources/voices/types/index.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +2 -2
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +5 -5
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +4 -5
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +4 -4
- package/dist/core/form-data-utils/FormDataWrapper.js +22 -12
- package/dist/core/index.js +17 -7
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +7 -5
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +22 -19
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +31 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +16 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +2 -4
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
- package/dist/core/streaming-fetcher/Stream.js +20 -21
- package/dist/core/websocket/ws.d.ts +7 -7
- package/dist/core/websocket/ws.js +17 -7
- package/dist/environments.d.ts +1 -1
- package/dist/errors/CartesiaError.js +2 -1
- package/dist/errors/CartesiaTimeoutError.d.ts +1 -1
- package/dist/errors/CartesiaTimeoutError.js +2 -2
- package/dist/index.js +17 -7
- package/dist/serialization/resources/apiStatus/types/ApiInfo.js +17 -7
- package/dist/serialization/resources/datasets/types/CreateDatasetRequest.js +17 -7
- package/dist/serialization/resources/datasets/types/Dataset.js +17 -7
- package/dist/serialization/resources/datasets/types/DatasetFile.js +17 -7
- package/dist/serialization/resources/datasets/types/FilePurpose.js +17 -7
- package/dist/serialization/resources/datasets/types/PaginatedDatasetFiles.js +17 -7
- package/dist/serialization/resources/datasets/types/PaginatedDatasets.js +17 -7
- package/dist/serialization/resources/embedding/types/Embedding.js +17 -7
- package/dist/serialization/resources/index.js +17 -7
- package/dist/serialization/resources/tts/types/CancelContextRequest.js +17 -7
- package/dist/serialization/resources/tts/types/ContextId.js +17 -7
- package/dist/serialization/resources/tts/types/Controls.js +17 -7
- package/dist/serialization/resources/tts/types/Emotion.js +17 -7
- package/dist/serialization/resources/tts/types/FlushId.d.ts +10 -0
- package/dist/serialization/resources/tts/types/FlushId.js +41 -0
- package/dist/serialization/resources/tts/types/GenerationRequest.d.ts +3 -2
- package/dist/serialization/resources/tts/types/GenerationRequest.js +20 -9
- package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +17 -7
- package/dist/serialization/resources/tts/types/NaturalSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/NumericalSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/OutputFormat.js +17 -7
- package/dist/serialization/resources/tts/types/PhonemeTimestamps.js +17 -7
- package/dist/serialization/resources/tts/types/RawEncoding.js +17 -7
- package/dist/serialization/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/dist/serialization/resources/tts/types/RawOutputFormat.js +18 -7
- package/dist/serialization/resources/tts/types/Speed.js +17 -7
- package/dist/serialization/resources/tts/types/SupportedLanguage.js +17 -7
- package/dist/serialization/resources/tts/types/TtsRequest.js +17 -7
- package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +17 -7
- package/dist/serialization/resources/tts/types/WavOutputFormat.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +15 -0
- package/dist/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +48 -0
- package/dist/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketRequest.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketResponse.d.ts +5 -1
- package/dist/serialization/resources/tts/types/WebSocketResponse.js +19 -7
- package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +17 -7
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +3 -0
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +20 -7
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +17 -7
- package/dist/serialization/resources/tts/types/WordTimestamps.js +17 -7
- package/dist/serialization/resources/tts/types/index.d.ts +2 -0
- package/dist/serialization/resources/tts/types/index.js +2 -0
- package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +17 -7
- package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +17 -7
- package/dist/serialization/resources/voices/client/index.js +17 -7
- package/dist/serialization/resources/voices/client/list.js +17 -7
- package/dist/serialization/resources/voices/types/CloneMode.js +17 -7
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.d.ts +2 -0
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +19 -7
- package/dist/serialization/resources/voices/types/EmbeddingResponse.js +17 -7
- package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +17 -7
- package/dist/serialization/resources/voices/types/Gender.js +17 -7
- package/dist/serialization/resources/voices/types/IdSpecifier.js +17 -7
- package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +3 -1
- package/dist/serialization/resources/voices/types/LocalizeDialect.js +24 -8
- package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.js +17 -7
- package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +10 -0
- package/dist/serialization/resources/voices/types/LocalizePortugueseDialect.js +41 -0
- package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +10 -0
- package/dist/serialization/resources/voices/types/LocalizeSpanishDialect.js +41 -0
- package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +17 -7
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +17 -7
- package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +17 -7
- package/dist/serialization/resources/voices/types/MixVoicesRequest.js +17 -7
- package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +17 -7
- package/dist/serialization/resources/voices/types/Voice.js +17 -7
- package/dist/serialization/resources/voices/types/VoiceId.js +17 -7
- package/dist/serialization/resources/voices/types/VoiceMetadata.js +17 -7
- package/dist/serialization/resources/voices/types/Weight.js +17 -7
- package/dist/serialization/resources/voices/types/index.d.ts +2 -0
- package/dist/serialization/resources/voices/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/WebPlayer.js +1 -1
- package/dist/wrapper/Websocket.js +25 -15
- package/dist/wrapper/source.js +1 -1
- package/dist/wrapper/utils.d.ts +9 -9
- package/dist/wrapper/utils.js +10 -10
- package/environments.d.ts +1 -1
- package/errors/CartesiaError.js +2 -1
- package/errors/CartesiaTimeoutError.d.ts +1 -1
- package/errors/CartesiaTimeoutError.js +2 -2
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +15 -16
- package/reference.md +72 -118
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/apiStatus/types/ApiInfo.js +17 -7
- package/serialization/resources/datasets/types/CreateDatasetRequest.js +17 -7
- package/serialization/resources/datasets/types/Dataset.js +17 -7
- package/serialization/resources/datasets/types/DatasetFile.js +17 -7
- package/serialization/resources/datasets/types/FilePurpose.js +17 -7
- package/serialization/resources/datasets/types/PaginatedDatasetFiles.js +17 -7
- package/serialization/resources/datasets/types/PaginatedDatasets.js +17 -7
- package/serialization/resources/embedding/types/Embedding.js +17 -7
- package/serialization/resources/index.js +17 -7
- package/serialization/resources/tts/types/CancelContextRequest.js +17 -7
- package/serialization/resources/tts/types/ContextId.js +17 -7
- package/serialization/resources/tts/types/Controls.js +17 -7
- package/serialization/resources/tts/types/Emotion.js +17 -7
- package/serialization/resources/tts/types/FlushId.d.ts +10 -0
- package/serialization/resources/tts/types/FlushId.js +41 -0
- package/serialization/resources/tts/types/GenerationRequest.d.ts +3 -2
- package/serialization/resources/tts/types/GenerationRequest.js +20 -9
- package/serialization/resources/tts/types/Mp3OutputFormat.js +17 -7
- package/serialization/resources/tts/types/NaturalSpecifier.js +17 -7
- package/serialization/resources/tts/types/NumericalSpecifier.js +17 -7
- package/serialization/resources/tts/types/OutputFormat.js +17 -7
- package/serialization/resources/tts/types/PhonemeTimestamps.js +17 -7
- package/serialization/resources/tts/types/RawEncoding.js +17 -7
- package/serialization/resources/tts/types/RawOutputFormat.d.ts +1 -0
- package/serialization/resources/tts/types/RawOutputFormat.js +18 -7
- package/serialization/resources/tts/types/Speed.js +17 -7
- package/serialization/resources/tts/types/SupportedLanguage.js +17 -7
- package/serialization/resources/tts/types/TtsRequest.js +17 -7
- package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +17 -7
- package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +17 -7
- package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +17 -7
- package/serialization/resources/tts/types/WavOutputFormat.js +17 -7
- package/serialization/resources/tts/types/WebSocketBaseResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketChunkResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketDoneResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketErrorResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketFlushDoneResponse.d.ts +15 -0
- package/serialization/resources/tts/types/WebSocketFlushDoneResponse.js +48 -0
- package/serialization/resources/tts/types/WebSocketPhonemeTimestampsResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +17 -7
- package/serialization/resources/tts/types/WebSocketRequest.js +17 -7
- package/serialization/resources/tts/types/WebSocketResponse.d.ts +5 -1
- package/serialization/resources/tts/types/WebSocketResponse.js +19 -7
- package/serialization/resources/tts/types/WebSocketStreamOptions.js +17 -7
- package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +17 -7
- package/serialization/resources/tts/types/WebSocketTtsOutput.d.ts +3 -0
- package/serialization/resources/tts/types/WebSocketTtsOutput.js +20 -7
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +17 -7
- package/serialization/resources/tts/types/WordTimestamps.js +17 -7
- package/serialization/resources/tts/types/index.d.ts +2 -0
- package/serialization/resources/tts/types/index.js +2 -0
- package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +17 -7
- package/serialization/resources/voiceChanger/types/StreamingResponse.js +17 -7
- package/serialization/resources/voices/client/index.js +17 -7
- package/serialization/resources/voices/client/list.js +17 -7
- package/serialization/resources/voices/types/CloneMode.js +17 -7
- package/serialization/resources/voices/types/CreateVoiceRequest.d.ts +2 -0
- package/serialization/resources/voices/types/CreateVoiceRequest.js +19 -7
- package/serialization/resources/voices/types/EmbeddingResponse.js +17 -7
- package/serialization/resources/voices/types/EmbeddingSpecifier.js +17 -7
- package/serialization/resources/voices/types/Gender.js +17 -7
- package/serialization/resources/voices/types/IdSpecifier.js +17 -7
- package/serialization/resources/voices/types/LocalizeDialect.d.ts +3 -1
- package/serialization/resources/voices/types/LocalizeDialect.js +24 -8
- package/serialization/resources/voices/types/LocalizeEnglishDialect.js +17 -7
- package/serialization/resources/voices/types/LocalizePortugueseDialect.d.ts +10 -0
- package/serialization/resources/voices/types/LocalizePortugueseDialect.js +41 -0
- package/serialization/resources/voices/types/LocalizeSpanishDialect.d.ts +10 -0
- package/serialization/resources/voices/types/LocalizeSpanishDialect.js +41 -0
- package/serialization/resources/voices/types/LocalizeTargetLanguage.js +17 -7
- package/serialization/resources/voices/types/LocalizeVoiceRequest.js +17 -7
- package/serialization/resources/voices/types/MixVoiceSpecifier.js +17 -7
- package/serialization/resources/voices/types/MixVoicesRequest.js +17 -7
- package/serialization/resources/voices/types/UpdateVoiceRequest.js +17 -7
- package/serialization/resources/voices/types/Voice.js +17 -7
- package/serialization/resources/voices/types/VoiceId.js +17 -7
- package/serialization/resources/voices/types/VoiceMetadata.js +17 -7
- package/serialization/resources/voices/types/Weight.js +17 -7
- package/serialization/resources/voices/types/index.d.ts +2 -0
- package/serialization/resources/voices/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/WebPlayer.js +1 -1
- package/wrapper/Websocket.js +25 -15
- package/wrapper/source.js +1 -1
- package/wrapper/utils.d.ts +9 -9
- package/wrapper/utils.js +10 -10
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -55,12 +65,12 @@ class Voices {
|
|
|
55
65
|
* await client.voices.list()
|
|
56
66
|
*/
|
|
57
67
|
list(requestOptions) {
|
|
58
|
-
var _a, _b, _c, _d, _e;
|
|
59
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
var _a, _b, _c, _d, _e, _f;
|
|
60
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
61
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
71
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CartesiaEnvironment.Production, "/voices/"),
|
|
62
72
|
method: "GET",
|
|
63
|
-
headers: Object.assign({ "Cartesia-Version": (
|
|
73
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.6", "User-Agent": "@cartesia/cartesia-js/2.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
64
74
|
contentType: "application/json",
|
|
65
75
|
requestType: "json",
|
|
66
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -89,7 +99,7 @@ class Voices {
|
|
|
89
99
|
body: _response.error.rawBody,
|
|
90
100
|
});
|
|
91
101
|
case "timeout":
|
|
92
|
-
throw new errors.CartesiaTimeoutError();
|
|
102
|
+
throw new errors.CartesiaTimeoutError("Timeout exceeded when calling GET /voices/.");
|
|
93
103
|
case "unknown":
|
|
94
104
|
throw new errors.CartesiaError({
|
|
95
105
|
message: _response.error.errorMessage,
|
|
@@ -98,33 +108,64 @@ class Voices {
|
|
|
98
108
|
});
|
|
99
109
|
}
|
|
100
110
|
/**
|
|
101
|
-
*
|
|
111
|
+
* Clone a voice from an audio clip. This endpoint has two modes, stability and similarity.
|
|
112
|
+
*
|
|
113
|
+
* Similarity mode clones are more similar to the source clip, but may reproduce background noise. For these, use an audio clip about 5 seconds long.
|
|
114
|
+
*
|
|
115
|
+
* Stability mode clones are more stable, but may not sound as similar to the source clip. For these, use an audio clip 10-20 seconds long.
|
|
116
|
+
*
|
|
117
|
+
* @param {File | fs.ReadStream | Blob} clip
|
|
118
|
+
* @param {Cartesia.CloneVoiceRequest} request
|
|
102
119
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
103
120
|
*
|
|
104
121
|
* @example
|
|
105
|
-
* await client.voices.
|
|
106
|
-
* name: "
|
|
107
|
-
* description: "
|
|
108
|
-
*
|
|
109
|
-
* language: "en"
|
|
122
|
+
* await client.voices.clone(fs.createReadStream("/path/to/your/file"), {
|
|
123
|
+
* name: "A high-stability cloned voice",
|
|
124
|
+
* description: "Copied from Cartesia docs",
|
|
125
|
+
* mode: "stability",
|
|
126
|
+
* language: "en",
|
|
127
|
+
* enhance: true
|
|
128
|
+
* })
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* await client.voices.clone(fs.createReadStream("/path/to/your/file"), {
|
|
132
|
+
* name: "A high-similarity cloned voice",
|
|
133
|
+
* description: "Copied from Cartesia docs",
|
|
134
|
+
* mode: "similarity",
|
|
135
|
+
* language: "en",
|
|
136
|
+
* transcript: "A transcript of the words spoken in the audio clip.",
|
|
137
|
+
* enhance: false
|
|
110
138
|
* })
|
|
111
139
|
*/
|
|
112
|
-
|
|
113
|
-
var _a, _b, _c, _d, _e;
|
|
140
|
+
clone(clip, request, requestOptions) {
|
|
114
141
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
var _a, _b, _c, _d, _e, _f;
|
|
143
|
+
const _request = yield core.newFormData();
|
|
144
|
+
yield _request.appendFile("clip", clip);
|
|
145
|
+
_request.append("name", request.name);
|
|
146
|
+
if (request.description != null) {
|
|
147
|
+
_request.append("description", request.description);
|
|
148
|
+
}
|
|
149
|
+
_request.append("language", serializers.SupportedLanguage.jsonOrThrow(request.language, { unrecognizedObjectKeys: "strip" }));
|
|
150
|
+
_request.append("mode", serializers.CloneMode.jsonOrThrow(request.mode, { unrecognizedObjectKeys: "strip" }));
|
|
151
|
+
_request.append("enhance", request.enhance.toString());
|
|
152
|
+
if (request.transcript != null) {
|
|
153
|
+
_request.append("transcript", request.transcript);
|
|
154
|
+
}
|
|
155
|
+
const _maybeEncodedRequest = yield _request.getRequest();
|
|
115
156
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
116
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
157
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CartesiaEnvironment.Production, "/voices/clone"),
|
|
117
158
|
method: "POST",
|
|
118
|
-
headers: Object.assign({ "Cartesia-Version": (
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
body:
|
|
159
|
+
headers: Object.assign(Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.6", "User-Agent": "@cartesia/cartesia-js/2.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
160
|
+
requestType: "file",
|
|
161
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
162
|
+
body: _maybeEncodedRequest.body,
|
|
122
163
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
123
164
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
124
165
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
125
166
|
});
|
|
126
167
|
if (_response.ok) {
|
|
127
|
-
return serializers.
|
|
168
|
+
return serializers.VoiceMetadata.parseOrThrow(_response.body, {
|
|
128
169
|
unrecognizedObjectKeys: "passthrough",
|
|
129
170
|
allowUnrecognizedUnionMembers: true,
|
|
130
171
|
allowUnrecognizedEnumValues: true,
|
|
@@ -145,7 +186,7 @@ class Voices {
|
|
|
145
186
|
body: _response.error.rawBody,
|
|
146
187
|
});
|
|
147
188
|
case "timeout":
|
|
148
|
-
throw new errors.CartesiaTimeoutError();
|
|
189
|
+
throw new errors.CartesiaTimeoutError("Timeout exceeded when calling POST /voices/clone.");
|
|
149
190
|
case "unknown":
|
|
150
191
|
throw new errors.CartesiaError({
|
|
151
192
|
message: _response.error.errorMessage,
|
|
@@ -158,15 +199,15 @@ class Voices {
|
|
|
158
199
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
159
200
|
*
|
|
160
201
|
* @example
|
|
161
|
-
* await client.voices.delete("
|
|
202
|
+
* await client.voices.delete("id")
|
|
162
203
|
*/
|
|
163
204
|
delete(id, requestOptions) {
|
|
164
|
-
var _a, _b, _c, _d, _e;
|
|
165
205
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
var _a, _b, _c, _d, _e, _f;
|
|
166
207
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
167
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
208
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
168
209
|
method: "DELETE",
|
|
169
|
-
headers: Object.assign({ "Cartesia-Version": (
|
|
210
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.6", "User-Agent": "@cartesia/cartesia-js/2.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
170
211
|
contentType: "application/json",
|
|
171
212
|
requestType: "json",
|
|
172
213
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -189,7 +230,7 @@ class Voices {
|
|
|
189
230
|
body: _response.error.rawBody,
|
|
190
231
|
});
|
|
191
232
|
case "timeout":
|
|
192
|
-
throw new errors.CartesiaTimeoutError();
|
|
233
|
+
throw new errors.CartesiaTimeoutError("Timeout exceeded when calling DELETE /voices/{id}.");
|
|
193
234
|
case "unknown":
|
|
194
235
|
throw new errors.CartesiaError({
|
|
195
236
|
message: _response.error.errorMessage,
|
|
@@ -203,18 +244,18 @@ class Voices {
|
|
|
203
244
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
204
245
|
*
|
|
205
246
|
* @example
|
|
206
|
-
* await client.voices.update("
|
|
207
|
-
* name: "
|
|
208
|
-
* description: "
|
|
247
|
+
* await client.voices.update("id", {
|
|
248
|
+
* name: "name",
|
|
249
|
+
* description: "description"
|
|
209
250
|
* })
|
|
210
251
|
*/
|
|
211
252
|
update(id, request, requestOptions) {
|
|
212
|
-
var _a, _b, _c, _d, _e;
|
|
213
253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
var _a, _b, _c, _d, _e, _f;
|
|
214
255
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
215
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
256
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
216
257
|
method: "PATCH",
|
|
217
|
-
headers: Object.assign({ "Cartesia-Version": (
|
|
258
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.6", "User-Agent": "@cartesia/cartesia-js/2.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
218
259
|
contentType: "application/json",
|
|
219
260
|
requestType: "json",
|
|
220
261
|
body: serializers.UpdateVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -244,7 +285,7 @@ class Voices {
|
|
|
244
285
|
body: _response.error.rawBody,
|
|
245
286
|
});
|
|
246
287
|
case "timeout":
|
|
247
|
-
throw new errors.CartesiaTimeoutError();
|
|
288
|
+
throw new errors.CartesiaTimeoutError("Timeout exceeded when calling PATCH /voices/{id}.");
|
|
248
289
|
case "unknown":
|
|
249
290
|
throw new errors.CartesiaError({
|
|
250
291
|
message: _response.error.errorMessage,
|
|
@@ -257,15 +298,15 @@ class Voices {
|
|
|
257
298
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
258
299
|
*
|
|
259
300
|
* @example
|
|
260
|
-
* await client.voices.get("
|
|
301
|
+
* await client.voices.get("id")
|
|
261
302
|
*/
|
|
262
303
|
get(id, requestOptions) {
|
|
263
|
-
var _a, _b, _c, _d, _e;
|
|
264
304
|
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
var _a, _b, _c, _d, _e, _f;
|
|
265
306
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
266
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
307
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CartesiaEnvironment.Production, `/voices/${encodeURIComponent(serializers.VoiceId.jsonOrThrow(id))}`),
|
|
267
308
|
method: "GET",
|
|
268
|
-
headers: Object.assign({ "Cartesia-Version": (
|
|
309
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.6", "User-Agent": "@cartesia/cartesia-js/2.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
269
310
|
contentType: "application/json",
|
|
270
311
|
requestType: "json",
|
|
271
312
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -294,7 +335,7 @@ class Voices {
|
|
|
294
335
|
body: _response.error.rawBody,
|
|
295
336
|
});
|
|
296
337
|
case "timeout":
|
|
297
|
-
throw new errors.CartesiaTimeoutError();
|
|
338
|
+
throw new errors.CartesiaTimeoutError("Timeout exceeded when calling GET /voices/{id}.");
|
|
298
339
|
case "unknown":
|
|
299
340
|
throw new errors.CartesiaError({
|
|
300
341
|
message: _response.error.errorMessage,
|
|
@@ -308,19 +349,19 @@ class Voices {
|
|
|
308
349
|
*
|
|
309
350
|
* @example
|
|
310
351
|
* await client.voices.localize({
|
|
311
|
-
* embedding: [1
|
|
352
|
+
* embedding: [1.1, 1.1],
|
|
312
353
|
* language: "en",
|
|
313
354
|
* originalSpeakerGender: "male",
|
|
314
|
-
* dialect:
|
|
355
|
+
* dialect: undefined
|
|
315
356
|
* })
|
|
316
357
|
*/
|
|
317
358
|
localize(request, requestOptions) {
|
|
318
|
-
var _a, _b, _c, _d, _e;
|
|
319
359
|
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
+
var _a, _b, _c, _d, _e, _f;
|
|
320
361
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
321
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
362
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CartesiaEnvironment.Production, "/voices/localize"),
|
|
322
363
|
method: "POST",
|
|
323
|
-
headers: Object.assign({ "Cartesia-Version": (
|
|
364
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.6", "User-Agent": "@cartesia/cartesia-js/2.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
324
365
|
contentType: "application/json",
|
|
325
366
|
requestType: "json",
|
|
326
367
|
body: serializers.LocalizeVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -350,7 +391,7 @@ class Voices {
|
|
|
350
391
|
body: _response.error.rawBody,
|
|
351
392
|
});
|
|
352
393
|
case "timeout":
|
|
353
|
-
throw new errors.CartesiaTimeoutError();
|
|
394
|
+
throw new errors.CartesiaTimeoutError("Timeout exceeded when calling POST /voices/localize.");
|
|
354
395
|
case "unknown":
|
|
355
396
|
throw new errors.CartesiaError({
|
|
356
397
|
message: _response.error.errorMessage,
|
|
@@ -365,18 +406,21 @@ class Voices {
|
|
|
365
406
|
* @example
|
|
366
407
|
* await client.voices.mix({
|
|
367
408
|
* voices: [{
|
|
368
|
-
* id: "
|
|
409
|
+
* id: "id",
|
|
410
|
+
* weight: 1.1
|
|
411
|
+
* }, {
|
|
412
|
+
* id: "id",
|
|
369
413
|
* weight: 1.1
|
|
370
414
|
* }]
|
|
371
415
|
* })
|
|
372
416
|
*/
|
|
373
417
|
mix(request, requestOptions) {
|
|
374
|
-
var _a, _b, _c, _d, _e;
|
|
375
418
|
return __awaiter(this, void 0, void 0, function* () {
|
|
419
|
+
var _a, _b, _c, _d, _e, _f;
|
|
376
420
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
377
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
421
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CartesiaEnvironment.Production, "/voices/mix"),
|
|
378
422
|
method: "POST",
|
|
379
|
-
headers: Object.assign({ "Cartesia-Version": (
|
|
423
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.6", "User-Agent": "@cartesia/cartesia-js/2.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
380
424
|
contentType: "application/json",
|
|
381
425
|
requestType: "json",
|
|
382
426
|
body: serializers.MixVoicesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -406,7 +450,7 @@ class Voices {
|
|
|
406
450
|
body: _response.error.rawBody,
|
|
407
451
|
});
|
|
408
452
|
case "timeout":
|
|
409
|
-
throw new errors.CartesiaTimeoutError();
|
|
453
|
+
throw new errors.CartesiaTimeoutError("Timeout exceeded when calling POST /voices/mix.");
|
|
410
454
|
case "unknown":
|
|
411
455
|
throw new errors.CartesiaError({
|
|
412
456
|
message: _response.error.errorMessage,
|
|
@@ -415,64 +459,36 @@ class Voices {
|
|
|
415
459
|
});
|
|
416
460
|
}
|
|
417
461
|
/**
|
|
418
|
-
*
|
|
462
|
+
* Create voice from raw features. If you'd like to clone a voice from an audio file, please use Clone Voice instead.
|
|
419
463
|
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
* Stability mode clones are more stable, but may not sound as similar to the source clip. For these, use an audio clip 10-20 seconds long.
|
|
423
|
-
*
|
|
424
|
-
* @param {File | fs.ReadStream | Blob} clip
|
|
425
|
-
* @param {Cartesia.CloneVoiceRequest} request
|
|
464
|
+
* @param {Cartesia.CreateVoiceRequest} request
|
|
426
465
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
427
466
|
*
|
|
428
467
|
* @example
|
|
429
|
-
* await client.voices.
|
|
430
|
-
* name: "
|
|
431
|
-
* description: "
|
|
432
|
-
*
|
|
433
|
-
* language: "en",
|
|
434
|
-
* enhance: true
|
|
435
|
-
* })
|
|
436
|
-
*
|
|
437
|
-
* @example
|
|
438
|
-
* await client.voices.clone(fs.createReadStream("/path/to/your/file"), {
|
|
439
|
-
* name: "A high-similarity cloned voice",
|
|
440
|
-
* description: "Copied from Cartesia docs",
|
|
441
|
-
* mode: "similarity",
|
|
468
|
+
* await client.voices.create({
|
|
469
|
+
* name: "My Custom Voice",
|
|
470
|
+
* description: "A custom voice created through the API",
|
|
471
|
+
* embedding: [],
|
|
442
472
|
* language: "en",
|
|
443
|
-
*
|
|
444
|
-
* enhance: false
|
|
473
|
+
* baseVoiceId: "123e4567-e89b-12d3-a456-426614174000"
|
|
445
474
|
* })
|
|
446
475
|
*/
|
|
447
|
-
|
|
448
|
-
var _a, _b, _c, _d, _e;
|
|
476
|
+
create(request, requestOptions) {
|
|
449
477
|
return __awaiter(this, void 0, void 0, function* () {
|
|
450
|
-
|
|
451
|
-
yield _request.appendFile("clip", clip);
|
|
452
|
-
yield _request.append("name", request.name);
|
|
453
|
-
if (request.description != null) {
|
|
454
|
-
yield _request.append("description", request.description);
|
|
455
|
-
}
|
|
456
|
-
yield _request.append("language", request.language);
|
|
457
|
-
yield _request.append("mode", request.mode);
|
|
458
|
-
yield _request.append("enhance", request.enhance.toString());
|
|
459
|
-
if (request.transcript != null) {
|
|
460
|
-
yield _request.append("transcript", request.transcript);
|
|
461
|
-
}
|
|
462
|
-
const _maybeEncodedRequest = yield _request.getRequest();
|
|
478
|
+
var _a, _b, _c, _d, _e, _f;
|
|
463
479
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
464
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
480
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CartesiaEnvironment.Production, "/voices/"),
|
|
465
481
|
method: "POST",
|
|
466
|
-
headers: Object.assign(Object.assign({ "Cartesia-Version": (
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
body:
|
|
482
|
+
headers: Object.assign(Object.assign({ "Cartesia-Version": (_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.cartesiaVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.cartesiaVersion) !== null && _f !== void 0 ? _f : "2024-06-10", "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@cartesia/cartesia-js", "X-Fern-SDK-Version": "2.1.6", "User-Agent": "@cartesia/cartesia-js/2.1.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
483
|
+
contentType: "application/json",
|
|
484
|
+
requestType: "json",
|
|
485
|
+
body: serializers.CreateVoiceRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
470
486
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
471
487
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
472
488
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
473
489
|
});
|
|
474
490
|
if (_response.ok) {
|
|
475
|
-
return serializers.
|
|
491
|
+
return serializers.Voice.parseOrThrow(_response.body, {
|
|
476
492
|
unrecognizedObjectKeys: "passthrough",
|
|
477
493
|
allowUnrecognizedUnionMembers: true,
|
|
478
494
|
allowUnrecognizedEnumValues: true,
|
|
@@ -493,7 +509,7 @@ class Voices {
|
|
|
493
509
|
body: _response.error.rawBody,
|
|
494
510
|
});
|
|
495
511
|
case "timeout":
|
|
496
|
-
throw new errors.CartesiaTimeoutError();
|
|
512
|
+
throw new errors.CartesiaTimeoutError("Timeout exceeded when calling POST /voices/.");
|
|
497
513
|
case "unknown":
|
|
498
514
|
throw new errors.CartesiaError({
|
|
499
515
|
message: _response.error.errorMessage,
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Cartesia from "../../../index";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Pull in features from a base voice, used for features like voice mixing.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type BaseVoiceId = Cartesia.VoiceId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type CloneMode = "similarity" | "stability";
|
|
5
5
|
export declare const CloneMode: {
|
|
6
6
|
readonly Similarity: "similarity";
|
|
7
7
|
readonly Stability: "stability";
|
|
@@ -3,10 +3,18 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Cartesia from "../../../index";
|
|
5
5
|
/**
|
|
6
|
-
* The dialect to localize to. Only supported for English (`en`).
|
|
6
|
+
* The dialect to localize to. Only supported for English (`en`), Spanish (`es`), and Portuguese (`pt`).
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type LocalizeDialect =
|
|
9
9
|
/**
|
|
10
|
-
* Only available when language is set to English (`en`).
|
|
10
|
+
* Only available when language is set to English (`en`). Options: Australian (`au`), Indian (`in`), Southern (`so`), British (`uk`), or American (`us`).
|
|
11
11
|
* */
|
|
12
|
-
Cartesia.LocalizeEnglishDialect
|
|
12
|
+
Cartesia.LocalizeEnglishDialect
|
|
13
|
+
/**
|
|
14
|
+
* Only available when language is set to Spanish (`es`). Options: Mexican (`mx`) and Peninsular (`pe`).
|
|
15
|
+
* */
|
|
16
|
+
| Cartesia.LocalizeSpanishDialect
|
|
17
|
+
/**
|
|
18
|
+
* Only available when language is set to Portuguese (`pt`). Options: Brazilian (`br`) and European Portuguese (`eu`).
|
|
19
|
+
* */
|
|
20
|
+
| Cartesia.LocalizePortugueseDialect;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type LocalizeEnglishDialect = "au" | "in" | "so" | "uk" | "us";
|
|
5
5
|
export declare const LocalizeEnglishDialect: {
|
|
6
6
|
readonly Au: "au";
|
|
7
7
|
readonly In: "in";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LocalizePortugueseDialect = void 0;
|
|
7
|
+
exports.LocalizePortugueseDialect = {
|
|
8
|
+
Br: "br",
|
|
9
|
+
Eu: "eu",
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LocalizeSpanishDialect = void 0;
|
|
7
|
+
exports.LocalizeSpanishDialect = {
|
|
8
|
+
Mx: "mx",
|
|
9
|
+
Pe: "pe",
|
|
10
|
+
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Options: English (en), German (de), Spanish (es), French (fr), Japanese (ja), Portuguese (pt), Chinese (zh), Hindi (hi), Italian (it), Korean (ko), Dutch (nl), Polish (pl), Russian (ru), Swedish (sv), Turkish (tr).
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type LocalizeTargetLanguage = "en" | "de" | "es" | "fr" | "ja" | "pt" | "zh" | "hi" | "it" | "ko" | "nl" | "pl" | "ru" | "sv" | "tr";
|
|
10
10
|
export declare const LocalizeTargetLanguage: {
|
|
11
11
|
readonly En: "en";
|
|
12
12
|
readonly De: "de";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Cartesia from "../../../index";
|
|
5
|
-
export
|
|
5
|
+
export type MixVoiceSpecifier = Cartesia.IdSpecifier | Cartesia.EmbeddingSpecifier;
|
|
@@ -6,6 +6,8 @@ export * from "./CreateVoiceRequest";
|
|
|
6
6
|
export * from "./UpdateVoiceRequest";
|
|
7
7
|
export * from "./LocalizeTargetLanguage";
|
|
8
8
|
export * from "./LocalizeEnglishDialect";
|
|
9
|
+
export * from "./LocalizeSpanishDialect";
|
|
10
|
+
export * from "./LocalizePortugueseDialect";
|
|
9
11
|
export * from "./LocalizeDialect";
|
|
10
12
|
export * from "./Gender";
|
|
11
13
|
export * from "./LocalizeVoiceRequest";
|
|
@@ -22,6 +22,8 @@ __exportStar(require("./CreateVoiceRequest"), exports);
|
|
|
22
22
|
__exportStar(require("./UpdateVoiceRequest"), exports);
|
|
23
23
|
__exportStar(require("./LocalizeTargetLanguage"), exports);
|
|
24
24
|
__exportStar(require("./LocalizeEnglishDialect"), exports);
|
|
25
|
+
__exportStar(require("./LocalizeSpanishDialect"), exports);
|
|
26
|
+
__exportStar(require("./LocalizePortugueseDialect"), exports);
|
|
25
27
|
__exportStar(require("./LocalizeDialect"), exports);
|
|
26
28
|
__exportStar(require("./Gender"), exports);
|
|
27
29
|
__exportStar(require("./LocalizeVoiceRequest"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
|
|
2
2
|
export interface SuccessfulResponse<T> {
|
|
3
3
|
ok: true;
|
|
4
4
|
body: T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIResponse } from "./APIResponse";
|
|
2
|
-
export
|
|
2
|
+
export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
3
3
|
export declare namespace Fetcher {
|
|
4
4
|
interface Args {
|
|
5
5
|
url: string;
|
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.fetcher =
|
|
12
|
+
exports.fetcher = void 0;
|
|
13
|
+
exports.fetcherImpl = fetcherImpl;
|
|
13
14
|
const createRequestUrl_1 = require("./createRequestUrl");
|
|
14
15
|
const getFetchFn_1 = require("./getFetchFn");
|
|
15
16
|
const getRequestBody_1 = require("./getRequestBody");
|
|
@@ -95,5 +96,4 @@ function fetcherImpl(args) {
|
|
|
95
96
|
}
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
|
-
exports.fetcherImpl = fetcherImpl;
|
|
99
99
|
exports.fetcher = fetcherImpl;
|