@cartesia/cartesia-js 2.0.2 → 2.0.4-alpha0
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 +3 -0
- package/Client.js +18 -9
- package/README.md +1 -5
- package/api/index.js +17 -1
- package/api/resources/apiStatus/client/Client.js +33 -6
- package/api/resources/apiStatus/client/index.js +2 -1
- package/api/resources/apiStatus/index.js +18 -2
- package/api/resources/apiStatus/types/ApiInfo.js +2 -1
- package/api/resources/apiStatus/types/index.js +17 -1
- package/api/resources/datasets/client/Client.d.ts +70 -0
- package/api/resources/datasets/client/Client.js +261 -0
- package/api/resources/datasets/client/index.d.ts +1 -0
- package/api/resources/datasets/client/index.js +17 -0
- package/api/resources/datasets/client/requests/UploadDatasetFileRequest.d.ts +11 -0
- package/api/resources/datasets/client/requests/UploadDatasetFileRequest.js +5 -0
- package/api/resources/datasets/client/requests/index.d.ts +1 -0
- package/api/resources/datasets/client/requests/index.js +2 -0
- package/api/resources/datasets/index.d.ts +2 -0
- package/api/resources/datasets/index.js +18 -0
- package/api/resources/datasets/types/CreateDatasetRequest.d.ts +6 -0
- package/api/resources/datasets/types/CreateDatasetRequest.js +5 -0
- package/api/resources/datasets/types/Dataset.d.ts +8 -0
- package/api/resources/datasets/types/Dataset.js +5 -0
- package/api/resources/datasets/types/DatasetFile.d.ts +8 -0
- package/api/resources/datasets/types/DatasetFile.js +5 -0
- package/api/resources/datasets/types/FilePurpose.d.ts +7 -0
- package/api/resources/datasets/types/FilePurpose.js +9 -0
- package/api/resources/datasets/types/PaginatedDatasetFiles.d.ts +8 -0
- package/api/resources/datasets/types/PaginatedDatasetFiles.js +5 -0
- package/api/resources/datasets/types/PaginatedDatasets.d.ts +8 -0
- package/api/resources/datasets/types/PaginatedDatasets.js +5 -0
- package/api/resources/datasets/types/index.d.ts +6 -0
- package/api/resources/datasets/types/index.js +22 -0
- package/api/resources/embedding/index.js +17 -1
- package/api/resources/embedding/types/Embedding.js +2 -1
- package/api/resources/embedding/types/index.js +17 -1
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +44 -12
- package/api/resources/tts/client/Client.js +40 -10
- package/api/resources/tts/client/index.js +2 -1
- package/api/resources/tts/index.js +18 -2
- package/api/resources/tts/types/CancelContextRequest.js +2 -1
- package/api/resources/tts/types/ContextId.js +2 -1
- package/api/resources/tts/types/Controls.js +2 -1
- package/api/resources/tts/types/Emotion.js +4 -1
- package/api/resources/tts/types/GenerationRequest.js +2 -1
- package/api/resources/tts/types/Mp3OutputFormat.js +2 -1
- package/api/resources/tts/types/NaturalSpecifier.js +4 -1
- package/api/resources/tts/types/NumericalSpecifier.js +2 -1
- package/api/resources/tts/types/OutputFormat.js +2 -1
- package/api/resources/tts/types/RawEncoding.js +4 -1
- package/api/resources/tts/types/RawOutputFormat.js +2 -1
- package/api/resources/tts/types/Speed.js +2 -1
- package/api/resources/tts/types/SupportedLanguage.js +4 -1
- package/api/resources/tts/types/TtsRequest.js +2 -1
- package/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +2 -1
- package/api/resources/tts/types/TtsRequestIdSpecifier.js +2 -1
- package/api/resources/tts/types/TtsRequestVoiceSpecifier.js +2 -1
- package/api/resources/tts/types/WavOutputFormat.js +2 -1
- package/api/resources/tts/types/WebSocketBaseResponse.js +2 -1
- package/api/resources/tts/types/WebSocketChunkResponse.js +2 -1
- package/api/resources/tts/types/WebSocketDoneResponse.js +2 -1
- package/api/resources/tts/types/WebSocketErrorResponse.js +2 -1
- package/api/resources/tts/types/WebSocketRawOutputFormat.js +2 -1
- package/api/resources/tts/types/WebSocketRequest.js +2 -1
- package/api/resources/tts/types/WebSocketResponse.js +2 -1
- package/api/resources/tts/types/WebSocketStreamOptions.js +2 -1
- package/api/resources/tts/types/WebSocketTimestampsResponse.js +2 -1
- package/api/resources/tts/types/WebSocketTtsOutput.js +2 -1
- package/api/resources/tts/types/WebSocketTtsRequest.js +2 -1
- package/api/resources/tts/types/WordTimestamps.js +2 -1
- package/api/resources/tts/types/index.js +46 -30
- package/api/resources/voiceChanger/client/Client.js +40 -10
- package/api/resources/voiceChanger/client/index.js +17 -1
- package/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +2 -1
- package/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +2 -1
- package/api/resources/voiceChanger/client/requests/index.js +2 -1
- package/api/resources/voiceChanger/index.js +18 -2
- package/api/resources/voiceChanger/types/OutputFormatContainer.js +4 -1
- package/api/resources/voiceChanger/types/StreamingResponse.js +2 -1
- package/api/resources/voiceChanger/types/index.js +18 -2
- package/api/resources/voices/client/Client.js +52 -22
- package/api/resources/voices/client/index.js +17 -1
- package/api/resources/voices/client/requests/CloneVoiceRequest.js +2 -1
- package/api/resources/voices/client/requests/index.js +2 -1
- package/api/resources/voices/index.js +18 -2
- package/api/resources/voices/types/BaseVoiceId.js +2 -1
- package/api/resources/voices/types/CloneMode.js +4 -1
- package/api/resources/voices/types/CreateVoiceRequest.js +2 -1
- package/api/resources/voices/types/EmbeddingResponse.js +2 -1
- package/api/resources/voices/types/EmbeddingSpecifier.js +2 -1
- package/api/resources/voices/types/Gender.js +4 -1
- package/api/resources/voices/types/IdSpecifier.js +2 -1
- package/api/resources/voices/types/LocalizeDialect.d.ts +11 -11
- package/api/resources/voices/types/LocalizeDialect.js +2 -7
- package/api/resources/voices/types/LocalizeEnglishDialect.d.ts +11 -0
- package/api/resources/voices/types/LocalizeEnglishDialect.js +13 -0
- package/api/resources/voices/types/LocalizeTargetLanguage.js +4 -1
- package/api/resources/voices/types/LocalizeVoiceRequest.js +2 -1
- package/api/resources/voices/types/MixVoiceSpecifier.js +2 -1
- package/api/resources/voices/types/MixVoicesRequest.js +2 -1
- package/api/resources/voices/types/UpdateVoiceRequest.js +2 -1
- package/api/resources/voices/types/Voice.js +2 -1
- package/api/resources/voices/types/VoiceId.js +2 -1
- package/api/resources/voices/types/VoiceMetadata.js +2 -1
- package/api/resources/voices/types/Weight.js +2 -1
- package/api/resources/voices/types/index.d.ts +1 -0
- package/api/resources/voices/types/index.js +34 -17
- package/core/fetcher/APIResponse.js +2 -1
- package/core/fetcher/Fetcher.js +18 -14
- package/core/fetcher/Supplier.js +4 -1
- package/core/fetcher/createRequestUrl.js +10 -3
- package/core/fetcher/getFetchFn.js +33 -6
- package/core/fetcher/getHeader.js +5 -1
- package/core/fetcher/getRequestBody.js +5 -1
- package/core/fetcher/getResponseBody.js +7 -3
- package/core/fetcher/index.js +9 -3
- package/core/fetcher/makeRequest.js +8 -4
- package/core/fetcher/requestWithRetries.js +5 -1
- package/core/fetcher/signals.js +7 -2
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +5 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +5 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +5 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +34 -7
- package/core/form-data-utils/FormDataWrapper.js +41 -11
- package/core/form-data-utils/index.js +17 -1
- package/core/index.d.ts +1 -1
- package/core/index.js +34 -5
- package/core/runtime/index.js +5 -1
- package/core/runtime/runtime.js +4 -1
- package/core/schemas/Schema.js +4 -1
- package/core/schemas/builders/bigint/bigint.js +13 -9
- package/core/schemas/builders/bigint/index.js +5 -1
- package/core/schemas/builders/date/date.js +14 -10
- package/core/schemas/builders/date/index.js +5 -1
- package/core/schemas/builders/enum/enum.js +11 -7
- package/core/schemas/builders/enum/index.js +5 -1
- package/core/schemas/builders/index.js +30 -14
- package/core/schemas/builders/lazy/index.js +7 -2
- package/core/schemas/builders/lazy/lazy.js +11 -5
- package/core/schemas/builders/lazy/lazyObject.js +11 -7
- package/core/schemas/builders/list/index.js +5 -1
- package/core/schemas/builders/list/list.js +12 -8
- package/core/schemas/builders/literals/booleanLiteral.js +10 -6
- package/core/schemas/builders/literals/index.js +7 -2
- package/core/schemas/builders/literals/stringLiteral.js +10 -6
- package/core/schemas/builders/object/index.js +11 -3
- package/core/schemas/builders/object/object.js +38 -33
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -3
- package/core/schemas/builders/object/property.js +7 -2
- package/core/schemas/builders/object/types.js +2 -1
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +15 -10
- package/core/schemas/builders/object-like/index.js +6 -1
- package/core/schemas/builders/object-like/types.js +2 -1
- package/core/schemas/builders/primitives/any.js +6 -3
- package/core/schemas/builders/primitives/boolean.js +8 -5
- package/core/schemas/builders/primitives/index.js +13 -5
- package/core/schemas/builders/primitives/number.js +8 -5
- package/core/schemas/builders/primitives/string.js +8 -5
- package/core/schemas/builders/primitives/unknown.js +6 -3
- package/core/schemas/builders/record/index.js +5 -1
- package/core/schemas/builders/record/record.js +18 -14
- package/core/schemas/builders/record/types.js +2 -1
- package/core/schemas/builders/schema-utils/JsonError.js +7 -3
- package/core/schemas/builders/schema-utils/ParseError.js +7 -3
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +15 -9
- package/core/schemas/builders/schema-utils/index.js +11 -3
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +5 -1
- package/core/schemas/builders/set/index.js +5 -1
- package/core/schemas/builders/set/set.js +14 -10
- package/core/schemas/builders/undiscriminated-union/index.js +5 -1
- package/core/schemas/builders/undiscriminated-union/types.js +2 -1
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +10 -6
- package/core/schemas/builders/union/discriminant.js +5 -1
- package/core/schemas/builders/union/index.js +7 -2
- package/core/schemas/builders/union/types.js +2 -1
- package/core/schemas/builders/union/union.js +18 -14
- package/core/schemas/index.js +17 -1
- package/core/schemas/utils/MaybePromise.js +2 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -1
- package/core/schemas/utils/createIdentitySchemaCreator.js +8 -4
- package/core/schemas/utils/entries.js +5 -1
- package/core/schemas/utils/filterObject.js +5 -1
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -1
- package/core/schemas/utils/isPlainObject.js +5 -1
- package/core/schemas/utils/keys.js +5 -1
- package/core/schemas/utils/maybeSkipValidation.js +5 -1
- package/core/schemas/utils/partition.js +5 -1
- package/core/streaming-fetcher/Stream.js +9 -4
- package/core/streaming-fetcher/index.js +5 -1
- package/core/websocket/events.js +9 -3
- package/core/websocket/index.js +17 -1
- package/core/websocket/ws.js +33 -6
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +18 -9
- package/dist/api/index.js +17 -1
- package/dist/api/resources/apiStatus/client/Client.js +33 -6
- package/dist/api/resources/apiStatus/client/index.js +2 -1
- package/dist/api/resources/apiStatus/index.js +18 -2
- package/dist/api/resources/apiStatus/types/ApiInfo.js +2 -1
- package/dist/api/resources/apiStatus/types/index.js +17 -1
- package/dist/api/resources/datasets/client/Client.d.ts +70 -0
- package/dist/api/resources/datasets/client/Client.js +261 -0
- package/dist/api/resources/datasets/client/index.d.ts +1 -0
- package/dist/api/resources/datasets/client/index.js +17 -0
- package/dist/api/resources/datasets/client/requests/UploadDatasetFileRequest.d.ts +11 -0
- package/dist/api/resources/datasets/client/requests/UploadDatasetFileRequest.js +5 -0
- package/dist/api/resources/datasets/client/requests/index.d.ts +1 -0
- package/dist/api/resources/datasets/client/requests/index.js +2 -0
- package/dist/api/resources/datasets/index.d.ts +2 -0
- package/dist/api/resources/datasets/index.js +18 -0
- package/dist/api/resources/datasets/types/CreateDatasetRequest.d.ts +6 -0
- package/dist/api/resources/datasets/types/CreateDatasetRequest.js +5 -0
- package/dist/api/resources/datasets/types/Dataset.d.ts +8 -0
- package/dist/api/resources/datasets/types/Dataset.js +5 -0
- package/dist/api/resources/datasets/types/DatasetFile.d.ts +8 -0
- package/dist/api/resources/datasets/types/DatasetFile.js +5 -0
- package/dist/api/resources/datasets/types/FilePurpose.d.ts +7 -0
- package/dist/api/resources/datasets/types/FilePurpose.js +9 -0
- package/dist/api/resources/datasets/types/PaginatedDatasetFiles.d.ts +8 -0
- package/dist/api/resources/datasets/types/PaginatedDatasetFiles.js +5 -0
- package/dist/api/resources/datasets/types/PaginatedDatasets.d.ts +8 -0
- package/dist/api/resources/datasets/types/PaginatedDatasets.js +5 -0
- package/dist/api/resources/datasets/types/index.d.ts +6 -0
- package/dist/api/resources/datasets/types/index.js +22 -0
- package/dist/api/resources/embedding/index.js +17 -1
- package/dist/api/resources/embedding/types/Embedding.js +2 -1
- package/dist/api/resources/embedding/types/index.js +17 -1
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +44 -12
- package/dist/api/resources/tts/client/Client.js +40 -10
- package/dist/api/resources/tts/client/index.js +2 -1
- package/dist/api/resources/tts/index.js +18 -2
- package/dist/api/resources/tts/types/CancelContextRequest.js +2 -1
- package/dist/api/resources/tts/types/ContextId.js +2 -1
- package/dist/api/resources/tts/types/Controls.js +2 -1
- package/dist/api/resources/tts/types/Emotion.js +4 -1
- package/dist/api/resources/tts/types/GenerationRequest.js +2 -1
- package/dist/api/resources/tts/types/Mp3OutputFormat.js +2 -1
- package/dist/api/resources/tts/types/NaturalSpecifier.js +4 -1
- package/dist/api/resources/tts/types/NumericalSpecifier.js +2 -1
- package/dist/api/resources/tts/types/OutputFormat.js +2 -1
- package/dist/api/resources/tts/types/RawEncoding.js +4 -1
- package/dist/api/resources/tts/types/RawOutputFormat.js +2 -1
- package/dist/api/resources/tts/types/Speed.js +2 -1
- package/dist/api/resources/tts/types/SupportedLanguage.js +4 -1
- package/dist/api/resources/tts/types/TtsRequest.js +2 -1
- package/dist/api/resources/tts/types/TtsRequestEmbeddingSpecifier.js +2 -1
- package/dist/api/resources/tts/types/TtsRequestIdSpecifier.js +2 -1
- package/dist/api/resources/tts/types/TtsRequestVoiceSpecifier.js +2 -1
- package/dist/api/resources/tts/types/WavOutputFormat.js +2 -1
- package/dist/api/resources/tts/types/WebSocketBaseResponse.js +2 -1
- package/dist/api/resources/tts/types/WebSocketChunkResponse.js +2 -1
- package/dist/api/resources/tts/types/WebSocketDoneResponse.js +2 -1
- package/dist/api/resources/tts/types/WebSocketErrorResponse.js +2 -1
- package/dist/api/resources/tts/types/WebSocketRawOutputFormat.js +2 -1
- package/dist/api/resources/tts/types/WebSocketRequest.js +2 -1
- package/dist/api/resources/tts/types/WebSocketResponse.js +2 -1
- package/dist/api/resources/tts/types/WebSocketStreamOptions.js +2 -1
- package/dist/api/resources/tts/types/WebSocketTimestampsResponse.js +2 -1
- package/dist/api/resources/tts/types/WebSocketTtsOutput.js +2 -1
- package/dist/api/resources/tts/types/WebSocketTtsRequest.js +2 -1
- package/dist/api/resources/tts/types/WordTimestamps.js +2 -1
- package/dist/api/resources/tts/types/index.js +46 -30
- package/dist/api/resources/voiceChanger/client/Client.js +40 -10
- package/dist/api/resources/voiceChanger/client/index.js +17 -1
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerBytesRequest.js +2 -1
- package/dist/api/resources/voiceChanger/client/requests/VoiceChangerSseRequest.js +2 -1
- package/dist/api/resources/voiceChanger/client/requests/index.js +2 -1
- package/dist/api/resources/voiceChanger/index.js +18 -2
- package/dist/api/resources/voiceChanger/types/OutputFormatContainer.js +4 -1
- package/dist/api/resources/voiceChanger/types/StreamingResponse.js +2 -1
- package/dist/api/resources/voiceChanger/types/index.js +18 -2
- package/dist/api/resources/voices/client/Client.js +52 -22
- package/dist/api/resources/voices/client/index.js +17 -1
- package/dist/api/resources/voices/client/requests/CloneVoiceRequest.js +2 -1
- package/dist/api/resources/voices/client/requests/index.js +2 -1
- package/dist/api/resources/voices/index.js +18 -2
- package/dist/api/resources/voices/types/BaseVoiceId.js +2 -1
- package/dist/api/resources/voices/types/CloneMode.js +4 -1
- package/dist/api/resources/voices/types/CreateVoiceRequest.js +2 -1
- package/dist/api/resources/voices/types/EmbeddingResponse.js +2 -1
- package/dist/api/resources/voices/types/EmbeddingSpecifier.js +2 -1
- package/dist/api/resources/voices/types/Gender.js +4 -1
- package/dist/api/resources/voices/types/IdSpecifier.js +2 -1
- package/dist/api/resources/voices/types/LocalizeDialect.d.ts +11 -11
- package/dist/api/resources/voices/types/LocalizeDialect.js +2 -7
- package/dist/api/resources/voices/types/LocalizeEnglishDialect.d.ts +11 -0
- package/dist/api/resources/voices/types/LocalizeEnglishDialect.js +13 -0
- package/dist/api/resources/voices/types/LocalizeTargetLanguage.js +4 -1
- package/dist/api/resources/voices/types/LocalizeVoiceRequest.js +2 -1
- package/dist/api/resources/voices/types/MixVoiceSpecifier.js +2 -1
- package/dist/api/resources/voices/types/MixVoicesRequest.js +2 -1
- package/dist/api/resources/voices/types/UpdateVoiceRequest.js +2 -1
- package/dist/api/resources/voices/types/Voice.js +2 -1
- package/dist/api/resources/voices/types/VoiceId.js +2 -1
- package/dist/api/resources/voices/types/VoiceMetadata.js +2 -1
- package/dist/api/resources/voices/types/Weight.js +2 -1
- package/dist/api/resources/voices/types/index.d.ts +1 -0
- package/dist/api/resources/voices/types/index.js +34 -17
- package/dist/core/fetcher/APIResponse.js +2 -1
- package/dist/core/fetcher/Fetcher.js +18 -14
- package/dist/core/fetcher/Supplier.js +4 -1
- package/dist/core/fetcher/createRequestUrl.js +10 -3
- package/dist/core/fetcher/getFetchFn.js +33 -6
- package/dist/core/fetcher/getHeader.js +5 -1
- package/dist/core/fetcher/getRequestBody.js +5 -1
- package/dist/core/fetcher/getResponseBody.js +7 -3
- package/dist/core/fetcher/index.js +9 -3
- package/dist/core/fetcher/makeRequest.js +8 -4
- package/dist/core/fetcher/requestWithRetries.js +5 -1
- package/dist/core/fetcher/signals.js +7 -2
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +5 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +5 -1
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +5 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +34 -7
- package/dist/core/form-data-utils/FormDataWrapper.js +41 -11
- package/dist/core/form-data-utils/index.js +17 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +34 -5
- package/dist/core/runtime/index.js +5 -1
- package/dist/core/runtime/runtime.js +4 -1
- package/dist/core/schemas/Schema.js +4 -1
- package/dist/core/schemas/builders/bigint/bigint.js +13 -9
- package/dist/core/schemas/builders/bigint/index.js +5 -1
- package/dist/core/schemas/builders/date/date.js +14 -10
- package/dist/core/schemas/builders/date/index.js +5 -1
- package/dist/core/schemas/builders/enum/enum.js +11 -7
- package/dist/core/schemas/builders/enum/index.js +5 -1
- package/dist/core/schemas/builders/index.js +30 -14
- package/dist/core/schemas/builders/lazy/index.js +7 -2
- package/dist/core/schemas/builders/lazy/lazy.js +11 -5
- package/dist/core/schemas/builders/lazy/lazyObject.js +11 -7
- package/dist/core/schemas/builders/list/index.js +5 -1
- package/dist/core/schemas/builders/list/list.js +12 -8
- package/dist/core/schemas/builders/literals/booleanLiteral.js +10 -6
- package/dist/core/schemas/builders/literals/index.js +7 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +10 -6
- package/dist/core/schemas/builders/object/index.js +11 -3
- package/dist/core/schemas/builders/object/object.js +38 -33
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -3
- package/dist/core/schemas/builders/object/property.js +7 -2
- package/dist/core/schemas/builders/object/types.js +2 -1
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +15 -10
- package/dist/core/schemas/builders/object-like/index.js +6 -1
- package/dist/core/schemas/builders/object-like/types.js +2 -1
- package/dist/core/schemas/builders/primitives/any.js +6 -3
- package/dist/core/schemas/builders/primitives/boolean.js +8 -5
- package/dist/core/schemas/builders/primitives/index.js +13 -5
- package/dist/core/schemas/builders/primitives/number.js +8 -5
- package/dist/core/schemas/builders/primitives/string.js +8 -5
- package/dist/core/schemas/builders/primitives/unknown.js +6 -3
- package/dist/core/schemas/builders/record/index.js +5 -1
- package/dist/core/schemas/builders/record/record.js +18 -14
- package/dist/core/schemas/builders/record/types.js +2 -1
- package/dist/core/schemas/builders/schema-utils/JsonError.js +7 -3
- package/dist/core/schemas/builders/schema-utils/ParseError.js +7 -3
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +15 -9
- package/dist/core/schemas/builders/schema-utils/index.js +11 -3
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +5 -1
- package/dist/core/schemas/builders/set/index.js +5 -1
- package/dist/core/schemas/builders/set/set.js +14 -10
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -1
- package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -1
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +10 -6
- package/dist/core/schemas/builders/union/discriminant.js +5 -1
- package/dist/core/schemas/builders/union/index.js +7 -2
- package/dist/core/schemas/builders/union/types.js +2 -1
- package/dist/core/schemas/builders/union/union.js +18 -14
- package/dist/core/schemas/index.js +17 -1
- package/dist/core/schemas/utils/MaybePromise.js +2 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -1
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +8 -4
- package/dist/core/schemas/utils/entries.js +5 -1
- package/dist/core/schemas/utils/filterObject.js +5 -1
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -1
- package/dist/core/schemas/utils/isPlainObject.js +5 -1
- package/dist/core/schemas/utils/keys.js +5 -1
- package/dist/core/schemas/utils/maybeSkipValidation.js +5 -1
- package/dist/core/schemas/utils/partition.js +5 -1
- package/dist/core/streaming-fetcher/Stream.js +9 -4
- package/dist/core/streaming-fetcher/index.js +5 -1
- package/dist/core/websocket/events.js +9 -3
- package/dist/core/websocket/index.js +17 -1
- package/dist/core/websocket/ws.js +33 -6
- package/dist/environments.js +4 -1
- package/dist/errors/CartesiaError.js +5 -1
- package/dist/errors/CartesiaTimeoutError.js +5 -1
- package/dist/errors/index.js +7 -2
- package/dist/index.js +34 -4
- package/dist/serialization/index.js +17 -1
- package/dist/serialization/resources/apiStatus/index.js +17 -1
- package/dist/serialization/resources/apiStatus/types/ApiInfo.js +28 -2
- package/dist/serialization/resources/apiStatus/types/index.js +17 -1
- package/dist/serialization/resources/datasets/index.d.ts +1 -0
- package/dist/serialization/resources/datasets/index.js +17 -0
- package/dist/serialization/resources/datasets/types/CreateDatasetRequest.d.ts +12 -0
- package/dist/serialization/resources/datasets/types/CreateDatasetRequest.js +33 -0
- package/dist/serialization/resources/datasets/types/Dataset.d.ts +14 -0
- package/dist/serialization/resources/datasets/types/Dataset.js +35 -0
- package/dist/serialization/resources/datasets/types/DatasetFile.d.ts +14 -0
- package/dist/serialization/resources/datasets/types/DatasetFile.js +35 -0
- package/dist/serialization/resources/datasets/types/FilePurpose.d.ts +10 -0
- package/dist/serialization/resources/datasets/types/FilePurpose.js +31 -0
- package/dist/serialization/resources/datasets/types/PaginatedDatasetFiles.d.ts +14 -0
- package/dist/serialization/resources/datasets/types/PaginatedDatasetFiles.js +35 -0
- package/dist/serialization/resources/datasets/types/PaginatedDatasets.d.ts +14 -0
- package/dist/serialization/resources/datasets/types/PaginatedDatasets.js +35 -0
- package/dist/serialization/resources/datasets/types/index.d.ts +6 -0
- package/dist/serialization/resources/datasets/types/index.js +22 -0
- package/dist/serialization/resources/embedding/index.js +17 -1
- package/dist/serialization/resources/embedding/types/Embedding.js +28 -2
- package/dist/serialization/resources/embedding/types/index.js +17 -1
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +41 -10
- package/dist/serialization/resources/tts/index.js +17 -1
- package/dist/serialization/resources/tts/types/CancelContextRequest.js +30 -4
- package/dist/serialization/resources/tts/types/ContextId.js +28 -2
- package/dist/serialization/resources/tts/types/Controls.js +32 -6
- package/dist/serialization/resources/tts/types/Emotion.js +28 -2
- package/dist/serialization/resources/tts/types/GenerationRequest.js +36 -10
- package/dist/serialization/resources/tts/types/Mp3OutputFormat.js +28 -2
- package/dist/serialization/resources/tts/types/NaturalSpecifier.js +28 -2
- package/dist/serialization/resources/tts/types/NumericalSpecifier.js +28 -2
- package/dist/serialization/resources/tts/types/OutputFormat.js +34 -8
- package/dist/serialization/resources/tts/types/RawEncoding.js +28 -2
- package/dist/serialization/resources/tts/types/RawOutputFormat.js +30 -4
- package/dist/serialization/resources/tts/types/Speed.js +30 -4
- package/dist/serialization/resources/tts/types/SupportedLanguage.js +28 -2
- package/dist/serialization/resources/tts/types/TtsRequest.js +34 -8
- package/dist/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +32 -6
- package/dist/serialization/resources/tts/types/TtsRequestIdSpecifier.js +32 -6
- package/dist/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +30 -4
- package/dist/serialization/resources/tts/types/WavOutputFormat.js +29 -3
- package/dist/serialization/resources/tts/types/WebSocketBaseResponse.js +30 -4
- package/dist/serialization/resources/tts/types/WebSocketChunkResponse.js +30 -4
- package/dist/serialization/resources/tts/types/WebSocketDoneResponse.js +29 -3
- package/dist/serialization/resources/tts/types/WebSocketErrorResponse.js +30 -4
- package/dist/serialization/resources/tts/types/WebSocketRawOutputFormat.js +30 -4
- package/dist/serialization/resources/tts/types/WebSocketRequest.js +30 -4
- package/dist/serialization/resources/tts/types/WebSocketResponse.js +36 -10
- package/dist/serialization/resources/tts/types/WebSocketStreamOptions.js +28 -2
- package/dist/serialization/resources/tts/types/WebSocketTimestampsResponse.js +32 -6
- package/dist/serialization/resources/tts/types/WebSocketTtsOutput.js +32 -6
- package/dist/serialization/resources/tts/types/WebSocketTtsRequest.js +32 -6
- package/dist/serialization/resources/tts/types/WordTimestamps.js +28 -2
- package/dist/serialization/resources/tts/types/index.js +46 -30
- package/dist/serialization/resources/voiceChanger/index.js +17 -1
- package/dist/serialization/resources/voiceChanger/types/OutputFormatContainer.js +28 -2
- package/dist/serialization/resources/voiceChanger/types/StreamingResponse.js +34 -8
- package/dist/serialization/resources/voiceChanger/types/index.js +18 -2
- package/dist/serialization/resources/voices/client/index.js +27 -1
- package/dist/serialization/resources/voices/client/list.js +29 -3
- package/dist/serialization/resources/voices/index.js +18 -2
- package/dist/serialization/resources/voices/types/BaseVoiceId.js +5 -2
- package/dist/serialization/resources/voices/types/CloneMode.js +28 -2
- package/dist/serialization/resources/voices/types/CreateVoiceRequest.js +34 -8
- package/dist/serialization/resources/voices/types/EmbeddingResponse.js +30 -4
- package/dist/serialization/resources/voices/types/EmbeddingSpecifier.js +32 -6
- package/dist/serialization/resources/voices/types/Gender.js +28 -2
- package/dist/serialization/resources/voices/types/IdSpecifier.js +32 -6
- package/dist/serialization/resources/voices/types/LocalizeDialect.d.ts +2 -1
- package/dist/serialization/resources/voices/types/LocalizeDialect.js +29 -2
- package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.d.ts +10 -0
- package/dist/serialization/resources/voices/types/LocalizeEnglishDialect.js +31 -0
- package/dist/serialization/resources/voices/types/LocalizeTargetLanguage.js +28 -2
- package/dist/serialization/resources/voices/types/LocalizeVoiceRequest.js +36 -10
- package/dist/serialization/resources/voices/types/MixVoiceSpecifier.js +30 -4
- package/dist/serialization/resources/voices/types/MixVoicesRequest.js +30 -4
- package/dist/serialization/resources/voices/types/UpdateVoiceRequest.js +28 -2
- package/dist/serialization/resources/voices/types/Voice.js +36 -10
- package/dist/serialization/resources/voices/types/VoiceId.js +28 -2
- package/dist/serialization/resources/voices/types/VoiceMetadata.js +32 -6
- package/dist/serialization/resources/voices/types/Weight.js +28 -2
- package/dist/serialization/resources/voices/types/index.d.ts +1 -0
- package/dist/serialization/resources/voices/types/index.js +34 -17
- package/dist/version.d.ts +1 -1
- package/dist/version.js +4 -1
- package/dist/wrapper/Client.js +8 -4
- package/dist/wrapper/StreamingTTSClient.js +11 -4
- package/dist/wrapper/WebPlayer.js +7 -3
- package/dist/wrapper/Websocket.d.ts +7 -24
- package/dist/wrapper/Websocket.js +101 -71
- package/dist/wrapper/source.d.ts +5 -4
- package/dist/wrapper/source.js +12 -6
- package/dist/wrapper/utils.js +28 -13
- package/environments.js +4 -1
- package/errors/CartesiaError.js +5 -1
- package/errors/CartesiaTimeoutError.js +5 -1
- package/errors/index.js +7 -2
- package/index.js +34 -4
- package/package.json +2 -2
- package/reference.md +204 -0
- package/serialization/index.js +17 -1
- package/serialization/resources/apiStatus/index.js +17 -1
- package/serialization/resources/apiStatus/types/ApiInfo.js +28 -2
- package/serialization/resources/apiStatus/types/index.js +17 -1
- package/serialization/resources/datasets/index.d.ts +1 -0
- package/serialization/resources/datasets/index.js +17 -0
- package/serialization/resources/datasets/types/CreateDatasetRequest.d.ts +12 -0
- package/serialization/resources/datasets/types/CreateDatasetRequest.js +33 -0
- package/serialization/resources/datasets/types/Dataset.d.ts +14 -0
- package/serialization/resources/datasets/types/Dataset.js +35 -0
- package/serialization/resources/datasets/types/DatasetFile.d.ts +14 -0
- package/serialization/resources/datasets/types/DatasetFile.js +35 -0
- package/serialization/resources/datasets/types/FilePurpose.d.ts +10 -0
- package/serialization/resources/datasets/types/FilePurpose.js +31 -0
- package/serialization/resources/datasets/types/PaginatedDatasetFiles.d.ts +14 -0
- package/serialization/resources/datasets/types/PaginatedDatasetFiles.js +35 -0
- package/serialization/resources/datasets/types/PaginatedDatasets.d.ts +14 -0
- package/serialization/resources/datasets/types/PaginatedDatasets.js +35 -0
- package/serialization/resources/datasets/types/index.d.ts +6 -0
- package/serialization/resources/datasets/types/index.js +22 -0
- package/serialization/resources/embedding/index.js +17 -1
- package/serialization/resources/embedding/types/Embedding.js +28 -2
- package/serialization/resources/embedding/types/index.js +17 -1
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +41 -10
- package/serialization/resources/tts/index.js +17 -1
- package/serialization/resources/tts/types/CancelContextRequest.js +30 -4
- package/serialization/resources/tts/types/ContextId.js +28 -2
- package/serialization/resources/tts/types/Controls.js +32 -6
- package/serialization/resources/tts/types/Emotion.js +28 -2
- package/serialization/resources/tts/types/GenerationRequest.js +36 -10
- package/serialization/resources/tts/types/Mp3OutputFormat.js +28 -2
- package/serialization/resources/tts/types/NaturalSpecifier.js +28 -2
- package/serialization/resources/tts/types/NumericalSpecifier.js +28 -2
- package/serialization/resources/tts/types/OutputFormat.js +34 -8
- package/serialization/resources/tts/types/RawEncoding.js +28 -2
- package/serialization/resources/tts/types/RawOutputFormat.js +30 -4
- package/serialization/resources/tts/types/Speed.js +30 -4
- package/serialization/resources/tts/types/SupportedLanguage.js +28 -2
- package/serialization/resources/tts/types/TtsRequest.js +34 -8
- package/serialization/resources/tts/types/TtsRequestEmbeddingSpecifier.js +32 -6
- package/serialization/resources/tts/types/TtsRequestIdSpecifier.js +32 -6
- package/serialization/resources/tts/types/TtsRequestVoiceSpecifier.js +30 -4
- package/serialization/resources/tts/types/WavOutputFormat.js +29 -3
- package/serialization/resources/tts/types/WebSocketBaseResponse.js +30 -4
- package/serialization/resources/tts/types/WebSocketChunkResponse.js +30 -4
- package/serialization/resources/tts/types/WebSocketDoneResponse.js +29 -3
- package/serialization/resources/tts/types/WebSocketErrorResponse.js +30 -4
- package/serialization/resources/tts/types/WebSocketRawOutputFormat.js +30 -4
- package/serialization/resources/tts/types/WebSocketRequest.js +30 -4
- package/serialization/resources/tts/types/WebSocketResponse.js +36 -10
- package/serialization/resources/tts/types/WebSocketStreamOptions.js +28 -2
- package/serialization/resources/tts/types/WebSocketTimestampsResponse.js +32 -6
- package/serialization/resources/tts/types/WebSocketTtsOutput.js +32 -6
- package/serialization/resources/tts/types/WebSocketTtsRequest.js +32 -6
- package/serialization/resources/tts/types/WordTimestamps.js +28 -2
- package/serialization/resources/tts/types/index.js +46 -30
- package/serialization/resources/voiceChanger/index.js +17 -1
- package/serialization/resources/voiceChanger/types/OutputFormatContainer.js +28 -2
- package/serialization/resources/voiceChanger/types/StreamingResponse.js +34 -8
- package/serialization/resources/voiceChanger/types/index.js +18 -2
- package/serialization/resources/voices/client/index.js +27 -1
- package/serialization/resources/voices/client/list.js +29 -3
- package/serialization/resources/voices/index.js +18 -2
- package/serialization/resources/voices/types/BaseVoiceId.js +5 -2
- package/serialization/resources/voices/types/CloneMode.js +28 -2
- package/serialization/resources/voices/types/CreateVoiceRequest.js +34 -8
- package/serialization/resources/voices/types/EmbeddingResponse.js +30 -4
- package/serialization/resources/voices/types/EmbeddingSpecifier.js +32 -6
- package/serialization/resources/voices/types/Gender.js +28 -2
- package/serialization/resources/voices/types/IdSpecifier.js +32 -6
- package/serialization/resources/voices/types/LocalizeDialect.d.ts +2 -1
- package/serialization/resources/voices/types/LocalizeDialect.js +29 -2
- package/serialization/resources/voices/types/LocalizeEnglishDialect.d.ts +10 -0
- package/serialization/resources/voices/types/LocalizeEnglishDialect.js +31 -0
- package/serialization/resources/voices/types/LocalizeTargetLanguage.js +28 -2
- package/serialization/resources/voices/types/LocalizeVoiceRequest.js +36 -10
- package/serialization/resources/voices/types/MixVoiceSpecifier.js +30 -4
- package/serialization/resources/voices/types/MixVoicesRequest.js +30 -4
- package/serialization/resources/voices/types/UpdateVoiceRequest.js +28 -2
- package/serialization/resources/voices/types/Voice.js +36 -10
- package/serialization/resources/voices/types/VoiceId.js +28 -2
- package/serialization/resources/voices/types/VoiceMetadata.js +32 -6
- package/serialization/resources/voices/types/Weight.js +28 -2
- package/serialization/resources/voices/types/index.d.ts +1 -0
- package/serialization/resources/voices/types/index.js +34 -17
- package/version.d.ts +1 -1
- package/version.js +4 -1
- package/wrapper/Client.js +8 -4
- package/wrapper/StreamingTTSClient.js +11 -4
- package/wrapper/WebPlayer.js +7 -3
- package/wrapper/Websocket.d.ts +7 -24
- package/wrapper/Websocket.js +101 -71
- package/wrapper/source.d.ts +5 -4
- package/wrapper/source.js +12 -6
- package/wrapper/utils.js +28 -13
package/dist/wrapper/utils.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getEmitteryCallbacks = exports.isComplete = exports.filterSentinel = exports.isSentinel = exports.getSentinel = exports.createMessageHandlerForContextId = exports.playAudioBuffer = exports.base64ToArray = exports.resolveOutputFormat = exports.ENCODING_MAP = void 0;
|
|
7
|
+
const base64_js_1 = __importDefault(require("base64-js"));
|
|
8
|
+
exports.ENCODING_MAP = {
|
|
3
9
|
pcm_f32le: { arrayType: Float32Array, bytesPerElement: 4 },
|
|
4
10
|
pcm_s16le: { arrayType: Int16Array, bytesPerElement: 2 },
|
|
5
11
|
pcm_alaw: { arrayType: Uint8Array, bytesPerElement: 1 },
|
|
@@ -13,7 +19,7 @@ export const ENCODING_MAP = {
|
|
|
13
19
|
* @param sampleRate - The sample rate of the audio.
|
|
14
20
|
* @returns The output format for the WebSocket request.
|
|
15
21
|
*/
|
|
16
|
-
|
|
22
|
+
function resolveOutputFormat(container, encoding, sampleRate) {
|
|
17
23
|
switch (container) {
|
|
18
24
|
case "wav":
|
|
19
25
|
return {
|
|
@@ -38,6 +44,7 @@ export function resolveOutputFormat(container, encoding, sampleRate) {
|
|
|
38
44
|
throw new Error(`Unsupported container type: ${container}`);
|
|
39
45
|
}
|
|
40
46
|
}
|
|
47
|
+
exports.resolveOutputFormat = resolveOutputFormat;
|
|
41
48
|
/**
|
|
42
49
|
* Convert base64-encoded audio buffer(s) to a TypedArray.
|
|
43
50
|
*
|
|
@@ -46,9 +53,9 @@ export function resolveOutputFormat(container, encoding, sampleRate) {
|
|
|
46
53
|
* @param encoding The encoding of the audio buffer(s).
|
|
47
54
|
* @returns The audio buffer(s) as a TypedArray.
|
|
48
55
|
*/
|
|
49
|
-
|
|
50
|
-
const byteArrays = filterSentinel(b64).map((b) =>
|
|
51
|
-
const { arrayType: ArrayType, bytesPerElement } = ENCODING_MAP[encoding];
|
|
56
|
+
function base64ToArray(b64, encoding) {
|
|
57
|
+
const byteArrays = filterSentinel(b64).map((b) => base64_js_1.default.toByteArray(b));
|
|
58
|
+
const { arrayType: ArrayType, bytesPerElement } = exports.ENCODING_MAP[encoding];
|
|
52
59
|
const totalLength = byteArrays.reduce((acc, arr) => acc + arr.length / bytesPerElement, 0);
|
|
53
60
|
const result = new ArrayType(totalLength);
|
|
54
61
|
let offset = 0;
|
|
@@ -59,6 +66,7 @@ export function base64ToArray(b64, encoding) {
|
|
|
59
66
|
}
|
|
60
67
|
return result;
|
|
61
68
|
}
|
|
69
|
+
exports.base64ToArray = base64ToArray;
|
|
62
70
|
/**
|
|
63
71
|
* Schedule an audio buffer to play at a given time in the passed context.
|
|
64
72
|
*
|
|
@@ -68,7 +76,7 @@ export function base64ToArray(b64, encoding) {
|
|
|
68
76
|
* @param sampleRate The sample rate of the audio.
|
|
69
77
|
* @returns A promise that resolves when the audio has finished playing.
|
|
70
78
|
*/
|
|
71
|
-
|
|
79
|
+
function playAudioBuffer(floats, context, startAt, sampleRate) {
|
|
72
80
|
const source = context.createBufferSource();
|
|
73
81
|
const buffer = context.createBuffer(1, floats.length, sampleRate);
|
|
74
82
|
buffer.getChannelData(0).set(floats);
|
|
@@ -81,6 +89,7 @@ export function playAudioBuffer(floats, context, startAt, sampleRate) {
|
|
|
81
89
|
};
|
|
82
90
|
});
|
|
83
91
|
}
|
|
92
|
+
exports.playAudioBuffer = playAudioBuffer;
|
|
84
93
|
/**
|
|
85
94
|
* Unwraps a chunk of audio data from a message event and calls the
|
|
86
95
|
* handler with it if the context ID matches.
|
|
@@ -89,7 +98,7 @@ export function playAudioBuffer(floats, context, startAt, sampleRate) {
|
|
|
89
98
|
* @param handler The handler to call with the chunk of audio data.
|
|
90
99
|
* @returns A message event handler.
|
|
91
100
|
*/
|
|
92
|
-
|
|
101
|
+
function createMessageHandlerForContextId(contextId, handler) {
|
|
93
102
|
return (event) => {
|
|
94
103
|
if (typeof event.data !== "string") {
|
|
95
104
|
return; // Ignore non-string messages.
|
|
@@ -109,46 +118,51 @@ export function createMessageHandlerForContextId(contextId, handler) {
|
|
|
109
118
|
handler({ chunk, message: event.data, data: message });
|
|
110
119
|
};
|
|
111
120
|
}
|
|
121
|
+
exports.createMessageHandlerForContextId = createMessageHandlerForContextId;
|
|
112
122
|
/**
|
|
113
123
|
* Get a sentinel value that indicates the end of a stream.
|
|
114
124
|
* @returns A sentinel value to indicate the end of a stream.
|
|
115
125
|
*/
|
|
116
|
-
|
|
126
|
+
function getSentinel() {
|
|
117
127
|
return null;
|
|
118
128
|
}
|
|
129
|
+
exports.getSentinel = getSentinel;
|
|
119
130
|
/**
|
|
120
131
|
* Check if a chunk is a sentinel value (i.e. null).
|
|
121
132
|
*
|
|
122
133
|
* @param chunk
|
|
123
134
|
* @returns Whether the chunk is a sentinel value.
|
|
124
135
|
*/
|
|
125
|
-
|
|
136
|
+
function isSentinel(x) {
|
|
126
137
|
return x === getSentinel();
|
|
127
138
|
}
|
|
139
|
+
exports.isSentinel = isSentinel;
|
|
128
140
|
/**
|
|
129
141
|
* Filter out null values from a collection.
|
|
130
142
|
*
|
|
131
143
|
* @param collection The collection to filter.
|
|
132
144
|
* @returns The collection with null values removed.
|
|
133
145
|
*/
|
|
134
|
-
|
|
146
|
+
function filterSentinel(collection) {
|
|
135
147
|
return collection.filter((x) => !isSentinel(x));
|
|
136
148
|
}
|
|
149
|
+
exports.filterSentinel = filterSentinel;
|
|
137
150
|
/**
|
|
138
151
|
* Check if an array of chunks is complete by testing if the last chunk is a sentinel
|
|
139
152
|
* value (i.e. null).
|
|
140
153
|
* @param chunk
|
|
141
154
|
* @returns Whether the array of chunks is complete.
|
|
142
155
|
*/
|
|
143
|
-
|
|
156
|
+
function isComplete(chunks) {
|
|
144
157
|
return isSentinel(chunks[chunks.length - 1]);
|
|
145
158
|
}
|
|
159
|
+
exports.isComplete = isComplete;
|
|
146
160
|
/**
|
|
147
161
|
* Get user-facing emitter callbacks for an Emittery instance.
|
|
148
162
|
* @param emitter The Emittery instance to get callbacks for.
|
|
149
163
|
* @returns User-facing emitter callbacks.
|
|
150
164
|
*/
|
|
151
|
-
|
|
165
|
+
function getEmitteryCallbacks(emitter) {
|
|
152
166
|
return {
|
|
153
167
|
on: emitter.on.bind(emitter),
|
|
154
168
|
off: emitter.off.bind(emitter),
|
|
@@ -156,3 +170,4 @@ export function getEmitteryCallbacks(emitter) {
|
|
|
156
170
|
events: emitter.events.bind(emitter),
|
|
157
171
|
};
|
|
158
172
|
}
|
|
173
|
+
exports.getEmitteryCallbacks = getEmitteryCallbacks;
|
package/environments.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CartesiaEnvironment = void 0;
|
|
7
|
+
exports.CartesiaEnvironment = {
|
|
5
8
|
Production: "https://api.cartesia.ai",
|
|
6
9
|
};
|
package/errors/CartesiaError.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CartesiaError = void 0;
|
|
7
|
+
class CartesiaError extends Error {
|
|
5
8
|
constructor({ message, statusCode, body }) {
|
|
6
9
|
super(buildMessage({ message, statusCode, body }));
|
|
7
10
|
Object.setPrototypeOf(this, CartesiaError.prototype);
|
|
@@ -13,6 +16,7 @@ export class CartesiaError extends Error {
|
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
}
|
|
19
|
+
exports.CartesiaError = CartesiaError;
|
|
16
20
|
function buildMessage({ message, statusCode, body, }) {
|
|
17
21
|
let lines = [];
|
|
18
22
|
if (message != null) {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CartesiaTimeoutError = void 0;
|
|
7
|
+
class CartesiaTimeoutError extends Error {
|
|
5
8
|
constructor() {
|
|
6
9
|
super("Timeout");
|
|
7
10
|
Object.setPrototypeOf(this, CartesiaTimeoutError.prototype);
|
|
8
11
|
}
|
|
9
12
|
}
|
|
13
|
+
exports.CartesiaTimeoutError = CartesiaTimeoutError;
|
package/errors/index.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CartesiaTimeoutError = exports.CartesiaError = void 0;
|
|
4
|
+
var CartesiaError_1 = require("./CartesiaError");
|
|
5
|
+
Object.defineProperty(exports, "CartesiaError", { enumerable: true, get: function () { return CartesiaError_1.CartesiaError; } });
|
|
6
|
+
var CartesiaTimeoutError_1 = require("./CartesiaTimeoutError");
|
|
7
|
+
Object.defineProperty(exports, "CartesiaTimeoutError", { enumerable: true, get: function () { return CartesiaTimeoutError_1.CartesiaTimeoutError; } });
|
package/index.js
CHANGED
|
@@ -1,4 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.CartesiaTimeoutError = exports.CartesiaError = exports.CartesiaEnvironment = exports.CartesiaClient = exports.Cartesia = void 0;
|
|
27
|
+
exports.Cartesia = __importStar(require("./api"));
|
|
28
|
+
var Client_1 = require("./wrapper/Client");
|
|
29
|
+
Object.defineProperty(exports, "CartesiaClient", { enumerable: true, get: function () { return Client_1.CartesiaClient; } });
|
|
30
|
+
var environments_1 = require("./environments");
|
|
31
|
+
Object.defineProperty(exports, "CartesiaEnvironment", { enumerable: true, get: function () { return environments_1.CartesiaEnvironment; } });
|
|
32
|
+
var errors_1 = require("./errors");
|
|
33
|
+
Object.defineProperty(exports, "CartesiaError", { enumerable: true, get: function () { return errors_1.CartesiaError; } });
|
|
34
|
+
Object.defineProperty(exports, "CartesiaTimeoutError", { enumerable: true, get: function () { return errors_1.CartesiaTimeoutError; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cartesia/cartesia-js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4-alpha0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "https://github.com/cartesia-ai/cartesia-js",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"qs": "6.11.2",
|
|
20
20
|
"readable-stream": "^4.5.2",
|
|
21
21
|
"form-data-encoder": "^4.0.2",
|
|
22
|
-
"emittery": "^
|
|
22
|
+
"emittery": "^0.13.1",
|
|
23
23
|
"human-id": "^4.1.1",
|
|
24
24
|
"ws": "^8.15.13"
|
|
25
25
|
},
|
package/reference.md
CHANGED
|
@@ -42,6 +42,210 @@ await client.apiStatus.get();
|
|
|
42
42
|
</dl>
|
|
43
43
|
</details>
|
|
44
44
|
|
|
45
|
+
## Datasets
|
|
46
|
+
|
|
47
|
+
<details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">list</a>() -> Cartesia.PaginatedDatasets</code></summary>
|
|
48
|
+
<dl>
|
|
49
|
+
<dd>
|
|
50
|
+
|
|
51
|
+
#### 🔌 Usage
|
|
52
|
+
|
|
53
|
+
<dl>
|
|
54
|
+
<dd>
|
|
55
|
+
|
|
56
|
+
<dl>
|
|
57
|
+
<dd>
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
await client.datasets.list();
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
</dd>
|
|
64
|
+
</dl>
|
|
65
|
+
</dd>
|
|
66
|
+
</dl>
|
|
67
|
+
|
|
68
|
+
#### ⚙️ Parameters
|
|
69
|
+
|
|
70
|
+
<dl>
|
|
71
|
+
<dd>
|
|
72
|
+
|
|
73
|
+
<dl>
|
|
74
|
+
<dd>
|
|
75
|
+
|
|
76
|
+
**requestOptions:** `Datasets.RequestOptions`
|
|
77
|
+
|
|
78
|
+
</dd>
|
|
79
|
+
</dl>
|
|
80
|
+
</dd>
|
|
81
|
+
</dl>
|
|
82
|
+
|
|
83
|
+
</dd>
|
|
84
|
+
</dl>
|
|
85
|
+
</details>
|
|
86
|
+
|
|
87
|
+
<details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">create</a>({ ...params }) -> Cartesia.Dataset</code></summary>
|
|
88
|
+
<dl>
|
|
89
|
+
<dd>
|
|
90
|
+
|
|
91
|
+
#### 🔌 Usage
|
|
92
|
+
|
|
93
|
+
<dl>
|
|
94
|
+
<dd>
|
|
95
|
+
|
|
96
|
+
<dl>
|
|
97
|
+
<dd>
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
await client.datasets.create({
|
|
101
|
+
name: "string",
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
</dd>
|
|
106
|
+
</dl>
|
|
107
|
+
</dd>
|
|
108
|
+
</dl>
|
|
109
|
+
|
|
110
|
+
#### ⚙️ Parameters
|
|
111
|
+
|
|
112
|
+
<dl>
|
|
113
|
+
<dd>
|
|
114
|
+
|
|
115
|
+
<dl>
|
|
116
|
+
<dd>
|
|
117
|
+
|
|
118
|
+
**request:** `Cartesia.CreateDatasetRequest`
|
|
119
|
+
|
|
120
|
+
</dd>
|
|
121
|
+
</dl>
|
|
122
|
+
|
|
123
|
+
<dl>
|
|
124
|
+
<dd>
|
|
125
|
+
|
|
126
|
+
**requestOptions:** `Datasets.RequestOptions`
|
|
127
|
+
|
|
128
|
+
</dd>
|
|
129
|
+
</dl>
|
|
130
|
+
</dd>
|
|
131
|
+
</dl>
|
|
132
|
+
|
|
133
|
+
</dd>
|
|
134
|
+
</dl>
|
|
135
|
+
</details>
|
|
136
|
+
|
|
137
|
+
<details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">listFiles</a>(id) -> Cartesia.PaginatedDatasetFiles</code></summary>
|
|
138
|
+
<dl>
|
|
139
|
+
<dd>
|
|
140
|
+
|
|
141
|
+
#### 🔌 Usage
|
|
142
|
+
|
|
143
|
+
<dl>
|
|
144
|
+
<dd>
|
|
145
|
+
|
|
146
|
+
<dl>
|
|
147
|
+
<dd>
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
await client.datasets.listFiles("string");
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
</dd>
|
|
154
|
+
</dl>
|
|
155
|
+
</dd>
|
|
156
|
+
</dl>
|
|
157
|
+
|
|
158
|
+
#### ⚙️ Parameters
|
|
159
|
+
|
|
160
|
+
<dl>
|
|
161
|
+
<dd>
|
|
162
|
+
|
|
163
|
+
<dl>
|
|
164
|
+
<dd>
|
|
165
|
+
|
|
166
|
+
**id:** `string`
|
|
167
|
+
|
|
168
|
+
</dd>
|
|
169
|
+
</dl>
|
|
170
|
+
|
|
171
|
+
<dl>
|
|
172
|
+
<dd>
|
|
173
|
+
|
|
174
|
+
**requestOptions:** `Datasets.RequestOptions`
|
|
175
|
+
|
|
176
|
+
</dd>
|
|
177
|
+
</dl>
|
|
178
|
+
</dd>
|
|
179
|
+
</dl>
|
|
180
|
+
|
|
181
|
+
</dd>
|
|
182
|
+
</dl>
|
|
183
|
+
</details>
|
|
184
|
+
|
|
185
|
+
<details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">uploadFile</a>(file, id, { ...params }) -> void</code></summary>
|
|
186
|
+
<dl>
|
|
187
|
+
<dd>
|
|
188
|
+
|
|
189
|
+
#### 🔌 Usage
|
|
190
|
+
|
|
191
|
+
<dl>
|
|
192
|
+
<dd>
|
|
193
|
+
|
|
194
|
+
<dl>
|
|
195
|
+
<dd>
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
await client.datasets.uploadFile(fs.createReadStream("/path/to/your/file"), "string", {});
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
</dd>
|
|
202
|
+
</dl>
|
|
203
|
+
</dd>
|
|
204
|
+
</dl>
|
|
205
|
+
|
|
206
|
+
#### ⚙️ Parameters
|
|
207
|
+
|
|
208
|
+
<dl>
|
|
209
|
+
<dd>
|
|
210
|
+
|
|
211
|
+
<dl>
|
|
212
|
+
<dd>
|
|
213
|
+
|
|
214
|
+
**file:** `File | fs.ReadStream | Blob`
|
|
215
|
+
|
|
216
|
+
</dd>
|
|
217
|
+
</dl>
|
|
218
|
+
|
|
219
|
+
<dl>
|
|
220
|
+
<dd>
|
|
221
|
+
|
|
222
|
+
**id:** `string`
|
|
223
|
+
|
|
224
|
+
</dd>
|
|
225
|
+
</dl>
|
|
226
|
+
|
|
227
|
+
<dl>
|
|
228
|
+
<dd>
|
|
229
|
+
|
|
230
|
+
**request:** `Cartesia.UploadDatasetFileRequest`
|
|
231
|
+
|
|
232
|
+
</dd>
|
|
233
|
+
</dl>
|
|
234
|
+
|
|
235
|
+
<dl>
|
|
236
|
+
<dd>
|
|
237
|
+
|
|
238
|
+
**requestOptions:** `Datasets.RequestOptions`
|
|
239
|
+
|
|
240
|
+
</dd>
|
|
241
|
+
</dl>
|
|
242
|
+
</dd>
|
|
243
|
+
</dl>
|
|
244
|
+
|
|
245
|
+
</dd>
|
|
246
|
+
</dl>
|
|
247
|
+
</details>
|
|
248
|
+
|
|
45
249
|
## Tts
|
|
46
250
|
|
|
47
251
|
<details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">bytes</a>({ ...params }) -> stream.Readable</code></summary>
|
package/serialization/index.js
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./resources"), exports);
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
@@ -1,8 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.ApiInfo = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
exports.ApiInfo = core.serialization.object({
|
|
6
32
|
ok: core.serialization.boolean(),
|
|
7
33
|
version: core.serialization.string(),
|
|
8
34
|
});
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ApiInfo"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Cartesia from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
export declare const CreateDatasetRequest: core.serialization.ObjectSchema<serializers.CreateDatasetRequest.Raw, Cartesia.CreateDatasetRequest>;
|
|
8
|
+
export declare namespace CreateDatasetRequest {
|
|
9
|
+
interface Raw {
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.CreateDatasetRequest = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
exports.CreateDatasetRequest = core.serialization.object({
|
|
32
|
+
name: core.serialization.string(),
|
|
33
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Cartesia from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
export declare const Dataset: core.serialization.ObjectSchema<serializers.Dataset.Raw, Cartesia.Dataset>;
|
|
8
|
+
export declare namespace Dataset {
|
|
9
|
+
interface Raw {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
}
|
|
14
|
+
}
|