@cartesia/cartesia-js 2.0.2 → 2.0.3
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.js +13 -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/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.js +41 -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.js +4 -1
- 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.js +33 -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.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.js +13 -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/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.js +41 -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.js +4 -1
- 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.js +33 -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.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/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.js +39 -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.js +28 -2
- 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.js +33 -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/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/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.js +39 -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.js +28 -2
- 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.js +33 -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
|
@@ -1,17 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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("./VoiceId"), exports);
|
|
18
|
+
__exportStar(require("./BaseVoiceId"), exports);
|
|
19
|
+
__exportStar(require("./Voice"), exports);
|
|
20
|
+
__exportStar(require("./VoiceMetadata"), exports);
|
|
21
|
+
__exportStar(require("./CreateVoiceRequest"), exports);
|
|
22
|
+
__exportStar(require("./UpdateVoiceRequest"), exports);
|
|
23
|
+
__exportStar(require("./LocalizeTargetLanguage"), exports);
|
|
24
|
+
__exportStar(require("./LocalizeDialect"), exports);
|
|
25
|
+
__exportStar(require("./Gender"), exports);
|
|
26
|
+
__exportStar(require("./LocalizeVoiceRequest"), exports);
|
|
27
|
+
__exportStar(require("./EmbeddingResponse"), exports);
|
|
28
|
+
__exportStar(require("./MixVoicesRequest"), exports);
|
|
29
|
+
__exportStar(require("./Weight"), exports);
|
|
30
|
+
__exportStar(require("./IdSpecifier"), exports);
|
|
31
|
+
__exportStar(require("./EmbeddingSpecifier"), exports);
|
|
32
|
+
__exportStar(require("./MixVoiceSpecifier"), exports);
|
|
33
|
+
__exportStar(require("./CloneMode"), exports);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,13 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.fetcher = exports.fetcherImpl = void 0;
|
|
13
|
+
const createRequestUrl_1 = require("./createRequestUrl");
|
|
14
|
+
const getFetchFn_1 = require("./getFetchFn");
|
|
15
|
+
const getRequestBody_1 = require("./getRequestBody");
|
|
16
|
+
const getResponseBody_1 = require("./getResponseBody");
|
|
17
|
+
const makeRequest_1 = require("./makeRequest");
|
|
18
|
+
const requestWithRetries_1 = require("./requestWithRetries");
|
|
19
|
+
function fetcherImpl(args) {
|
|
17
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
21
|
const headers = {};
|
|
19
22
|
if (args.body !== undefined && args.contentType != null) {
|
|
@@ -26,17 +29,17 @@ export function fetcherImpl(args) {
|
|
|
26
29
|
}
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
|
-
const url = createRequestUrl(args.url, args.queryParameters);
|
|
30
|
-
let requestBody = yield getRequestBody({
|
|
32
|
+
const url = (0, createRequestUrl_1.createRequestUrl)(args.url, args.queryParameters);
|
|
33
|
+
let requestBody = yield (0, getRequestBody_1.getRequestBody)({
|
|
31
34
|
body: args.body,
|
|
32
35
|
type: args.requestType === "json" ? "json" : "other",
|
|
33
36
|
});
|
|
34
|
-
const fetchFn = yield getFetchFn();
|
|
37
|
+
const fetchFn = yield (0, getFetchFn_1.getFetchFn)();
|
|
35
38
|
try {
|
|
36
|
-
const response = yield requestWithRetries(() => __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
return makeRequest(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
|
39
|
+
const response = yield (0, requestWithRetries_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return (0, makeRequest_1.makeRequest)(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
|
38
41
|
}), args.maxRetries);
|
|
39
|
-
let responseBody = yield getResponseBody(response, args.responseType);
|
|
42
|
+
let responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
|
|
40
43
|
if (response.status >= 200 && response.status < 400) {
|
|
41
44
|
return {
|
|
42
45
|
ok: true,
|
|
@@ -92,4 +95,5 @@ export function fetcherImpl(args) {
|
|
|
92
95
|
}
|
|
93
96
|
});
|
|
94
97
|
}
|
|
95
|
-
|
|
98
|
+
exports.fetcherImpl = fetcherImpl;
|
|
99
|
+
exports.fetcher = fetcherImpl;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,7 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Supplier = void 0;
|
|
13
|
+
exports.Supplier = {
|
|
11
14
|
get: (supplier) => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
15
|
if (typeof supplier === "function") {
|
|
13
16
|
return supplier();
|
|
@@ -1,6 +1,13 @@
|
|
|
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.createRequestUrl = void 0;
|
|
7
|
+
const qs_1 = __importDefault(require("qs"));
|
|
8
|
+
function createRequestUrl(baseUrl, queryParameters) {
|
|
3
9
|
return Object.keys(queryParameters !== null && queryParameters !== void 0 ? queryParameters : {}).length > 0
|
|
4
|
-
? `${baseUrl}?${
|
|
10
|
+
? `${baseUrl}?${qs_1.default.stringify(queryParameters, { arrayFormat: "repeat" })}`
|
|
5
11
|
: baseUrl;
|
|
6
12
|
}
|
|
13
|
+
exports.createRequestUrl = createRequestUrl;
|
|
@@ -1,3 +1,27 @@
|
|
|
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
|
+
};
|
|
1
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,19 +31,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
32
|
});
|
|
9
33
|
};
|
|
10
|
-
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.getFetchFn = void 0;
|
|
36
|
+
const runtime_1 = require("../runtime");
|
|
11
37
|
/**
|
|
12
38
|
* Returns a fetch function based on the runtime
|
|
13
39
|
*/
|
|
14
|
-
|
|
40
|
+
function getFetchFn() {
|
|
15
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
42
|
// In Node.js 18+ environments, use native fetch
|
|
17
|
-
if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
|
|
43
|
+
if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
|
|
18
44
|
return fetch;
|
|
19
45
|
}
|
|
20
46
|
// In Node.js 18 or lower environments, the SDK always uses`node-fetch`.
|
|
21
|
-
if (RUNTIME.type === "node") {
|
|
22
|
-
return (yield
|
|
47
|
+
if (runtime_1.RUNTIME.type === "node") {
|
|
48
|
+
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
23
49
|
}
|
|
24
50
|
// Otherwise the SDK uses global fetch if available,
|
|
25
51
|
// and falls back to node-fetch.
|
|
@@ -27,6 +53,7 @@ export function getFetchFn() {
|
|
|
27
53
|
return fetch;
|
|
28
54
|
}
|
|
29
55
|
// Defaults to node `node-fetch` if global fetch isn't available
|
|
30
|
-
return (yield
|
|
56
|
+
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
31
57
|
});
|
|
32
58
|
}
|
|
59
|
+
exports.getFetchFn = getFetchFn;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHeader = void 0;
|
|
4
|
+
function getHeader(headers, header) {
|
|
2
5
|
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
|
3
6
|
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
|
4
7
|
return headerValue;
|
|
@@ -6,3 +9,4 @@ export function getHeader(headers, header) {
|
|
|
6
9
|
}
|
|
7
10
|
return undefined;
|
|
8
11
|
}
|
|
12
|
+
exports.getHeader = getHeader;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,7 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getRequestBody = void 0;
|
|
13
|
+
function getRequestBody({ body, type }) {
|
|
11
14
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12
15
|
if (type.includes("json")) {
|
|
13
16
|
return JSON.stringify(body);
|
|
@@ -17,3 +20,4 @@ export function getRequestBody({ body, type }) {
|
|
|
17
20
|
}
|
|
18
21
|
});
|
|
19
22
|
}
|
|
23
|
+
exports.getRequestBody = getRequestBody;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,8 +8,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getResponseBody = void 0;
|
|
13
|
+
const chooseStreamWrapper_1 = require("./stream-wrappers/chooseStreamWrapper");
|
|
14
|
+
function getResponseBody(response, responseType) {
|
|
12
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13
16
|
if (response.body != null && responseType === "blob") {
|
|
14
17
|
return yield response.blob();
|
|
@@ -17,7 +20,7 @@ export function getResponseBody(response, responseType) {
|
|
|
17
20
|
return response.body;
|
|
18
21
|
}
|
|
19
22
|
else if (response.body != null && responseType === "streaming") {
|
|
20
|
-
return chooseStreamWrapper(response.body);
|
|
23
|
+
return (0, chooseStreamWrapper_1.chooseStreamWrapper)(response.body);
|
|
21
24
|
}
|
|
22
25
|
else if (response.body != null && responseType === "text") {
|
|
23
26
|
return yield response.text();
|
|
@@ -46,3 +49,4 @@ export function getResponseBody(response, responseType) {
|
|
|
46
49
|
}
|
|
47
50
|
});
|
|
48
51
|
}
|
|
52
|
+
exports.getResponseBody = getResponseBody;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Supplier = exports.getHeader = exports.fetcher = void 0;
|
|
4
|
+
var Fetcher_1 = require("./Fetcher");
|
|
5
|
+
Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return Fetcher_1.fetcher; } });
|
|
6
|
+
var getHeader_1 = require("./getHeader");
|
|
7
|
+
Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_1.getHeader; } });
|
|
8
|
+
var Supplier_1 = require("./Supplier");
|
|
9
|
+
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_1.Supplier; } });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,13 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.makeRequest = void 0;
|
|
13
|
+
const signals_1 = require("./signals");
|
|
14
|
+
const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutMs, abortSignal, withCredentials, duplex) => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
15
|
const signals = [];
|
|
13
16
|
// Add timeout signal
|
|
14
17
|
let timeoutAbortId = undefined;
|
|
15
18
|
if (timeoutMs != null) {
|
|
16
|
-
const { signal, abortId } = getTimeoutSignal(timeoutMs);
|
|
19
|
+
const { signal, abortId } = (0, signals_1.getTimeoutSignal)(timeoutMs);
|
|
17
20
|
timeoutAbortId = abortId;
|
|
18
21
|
signals.push(signal);
|
|
19
22
|
}
|
|
@@ -21,7 +24,7 @@ export const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutM
|
|
|
21
24
|
if (abortSignal != null) {
|
|
22
25
|
signals.push(abortSignal);
|
|
23
26
|
}
|
|
24
|
-
let newSignals = anySignal(signals);
|
|
27
|
+
let newSignals = (0, signals_1.anySignal)(signals);
|
|
25
28
|
const response = yield fetchFn(url, {
|
|
26
29
|
method: method,
|
|
27
30
|
headers,
|
|
@@ -36,3 +39,4 @@ export const makeRequest = (fetchFn, url, method, headers, requestBody, timeoutM
|
|
|
36
39
|
}
|
|
37
40
|
return response;
|
|
38
41
|
});
|
|
42
|
+
exports.makeRequest = makeRequest;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,6 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.requestWithRetries = void 0;
|
|
10
13
|
const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
11
14
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
12
15
|
const DEFAULT_MAX_RETRIES = 2;
|
|
@@ -16,7 +19,7 @@ function addJitter(delay) {
|
|
|
16
19
|
const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR;
|
|
17
20
|
return delay * jitterMultiplier;
|
|
18
21
|
}
|
|
19
|
-
|
|
22
|
+
function requestWithRetries(requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
20
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
24
|
let response = yield requestFn();
|
|
22
25
|
for (let i = 0; i < maxRetries; ++i) {
|
|
@@ -35,3 +38,4 @@ export function requestWithRetries(requestFn, maxRetries = DEFAULT_MAX_RETRIES)
|
|
|
35
38
|
return response;
|
|
36
39
|
});
|
|
37
40
|
}
|
|
41
|
+
exports.requestWithRetries = requestWithRetries;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.anySignal = exports.getTimeoutSignal = void 0;
|
|
1
4
|
const TIMEOUT = "timeout";
|
|
2
|
-
|
|
5
|
+
function getTimeoutSignal(timeoutMs) {
|
|
3
6
|
const controller = new AbortController();
|
|
4
7
|
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
5
8
|
return { signal: controller.signal, abortId };
|
|
6
9
|
}
|
|
10
|
+
exports.getTimeoutSignal = getTimeoutSignal;
|
|
7
11
|
/**
|
|
8
12
|
* Returns an abort signal that is getting aborted when
|
|
9
13
|
* at least one of the specified abort signals is aborted.
|
|
10
14
|
*
|
|
11
15
|
* Requires at least node.js 18.
|
|
12
16
|
*/
|
|
13
|
-
|
|
17
|
+
function anySignal(...args) {
|
|
14
18
|
// Allowing signals to be passed either as array
|
|
15
19
|
// of signals or as multiple arguments.
|
|
16
20
|
const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
|
|
@@ -30,3 +34,4 @@ export function anySignal(...args) {
|
|
|
30
34
|
}
|
|
31
35
|
return controller.signal;
|
|
32
36
|
}
|
|
37
|
+
exports.anySignal = anySignal;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,7 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Node18UniversalStreamWrapper = void 0;
|
|
13
|
+
class Node18UniversalStreamWrapper {
|
|
11
14
|
constructor(readableStream) {
|
|
12
15
|
this.readableStream = readableStream;
|
|
13
16
|
this.reader = this.readableStream.getReader();
|
|
@@ -241,3 +244,4 @@ export class Node18UniversalStreamWrapper {
|
|
|
241
244
|
};
|
|
242
245
|
}
|
|
243
246
|
}
|
|
247
|
+
exports.Node18UniversalStreamWrapper = Node18UniversalStreamWrapper;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -14,7 +15,9 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
14
15
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
15
16
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.NodePre18StreamWrapper = void 0;
|
|
20
|
+
class NodePre18StreamWrapper {
|
|
18
21
|
constructor(readableStream) {
|
|
19
22
|
this.readableStream = readableStream;
|
|
20
23
|
}
|
|
@@ -118,3 +121,4 @@ export class NodePre18StreamWrapper {
|
|
|
118
121
|
};
|
|
119
122
|
}
|
|
120
123
|
}
|
|
124
|
+
exports.NodePre18StreamWrapper = NodePre18StreamWrapper;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,7 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
9
|
});
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UndiciStreamWrapper = void 0;
|
|
13
|
+
class UndiciStreamWrapper {
|
|
11
14
|
constructor(readableStream) {
|
|
12
15
|
this.readableStream = readableStream;
|
|
13
16
|
this.reader = this.readableStream.getReader();
|
|
@@ -223,3 +226,4 @@ export class UndiciStreamWrapper {
|
|
|
223
226
|
};
|
|
224
227
|
}
|
|
225
228
|
}
|
|
229
|
+
exports.UndiciStreamWrapper = UndiciStreamWrapper;
|
|
@@ -1,3 +1,27 @@
|
|
|
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
|
+
};
|
|
1
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,17 +31,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
32
|
});
|
|
9
33
|
};
|
|
10
|
-
|
|
11
|
-
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.chooseStreamWrapper = void 0;
|
|
36
|
+
const runtime_1 = require("../../runtime");
|
|
37
|
+
function chooseStreamWrapper(responseBody) {
|
|
12
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
|
|
14
|
-
return new (yield
|
|
39
|
+
if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
|
|
40
|
+
return new (yield Promise.resolve().then(() => __importStar(require("./Node18UniversalStreamWrapper")))).Node18UniversalStreamWrapper(responseBody);
|
|
15
41
|
}
|
|
16
|
-
else if (RUNTIME.type !== "node" && typeof fetch === "function") {
|
|
17
|
-
return new (yield
|
|
42
|
+
else if (runtime_1.RUNTIME.type !== "node" && typeof fetch === "function") {
|
|
43
|
+
return new (yield Promise.resolve().then(() => __importStar(require("./UndiciStreamWrapper")))).UndiciStreamWrapper(responseBody);
|
|
18
44
|
}
|
|
19
45
|
else {
|
|
20
|
-
return new (yield
|
|
46
|
+
return new (yield Promise.resolve().then(() => __importStar(require("./NodePre18StreamWrapper")))).NodePre18StreamWrapper(responseBody);
|
|
21
47
|
}
|
|
22
48
|
});
|
|
23
49
|
}
|
|
50
|
+
exports.chooseStreamWrapper = chooseStreamWrapper;
|
|
@@ -1,3 +1,27 @@
|
|
|
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
|
+
};
|
|
1
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -7,17 +31,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
32
|
});
|
|
9
33
|
};
|
|
10
|
-
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.WebFormData = exports.Node16FormData = exports.Node18FormData = exports.newFormData = void 0;
|
|
36
|
+
const runtime_1 = require("../runtime");
|
|
11
37
|
function isNamedValue(value) {
|
|
12
38
|
return typeof value === "object" && value != null && "name" in value;
|
|
13
39
|
}
|
|
14
|
-
|
|
40
|
+
function newFormData() {
|
|
15
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
42
|
let formdata;
|
|
17
|
-
if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
|
|
43
|
+
if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
|
|
18
44
|
formdata = new Node18FormData();
|
|
19
45
|
}
|
|
20
|
-
else if (RUNTIME.type === "node") {
|
|
46
|
+
else if (runtime_1.RUNTIME.type === "node") {
|
|
21
47
|
formdata = new Node16FormData();
|
|
22
48
|
}
|
|
23
49
|
else {
|
|
@@ -27,13 +53,14 @@ export function newFormData() {
|
|
|
27
53
|
return formdata;
|
|
28
54
|
});
|
|
29
55
|
}
|
|
56
|
+
exports.newFormData = newFormData;
|
|
30
57
|
/**
|
|
31
58
|
* Form Data Implementation for Node.js 18+
|
|
32
59
|
*/
|
|
33
|
-
|
|
60
|
+
class Node18FormData {
|
|
34
61
|
setup() {
|
|
35
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
this.fd = new (yield
|
|
63
|
+
this.fd = new (yield Promise.resolve().then(() => __importStar(require("formdata-node")))).FormData();
|
|
37
64
|
});
|
|
38
65
|
}
|
|
39
66
|
append(key, value) {
|
|
@@ -63,22 +90,23 @@ export class Node18FormData {
|
|
|
63
90
|
}
|
|
64
91
|
getRequest() {
|
|
65
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const encoder = new (yield
|
|
93
|
+
const encoder = new (yield Promise.resolve().then(() => __importStar(require("form-data-encoder")))).FormDataEncoder(this.fd);
|
|
67
94
|
return {
|
|
68
|
-
body: (yield
|
|
95
|
+
body: (yield Promise.resolve().then(() => __importStar(require("readable-stream")))).Readable.from(encoder),
|
|
69
96
|
headers: encoder.headers,
|
|
70
97
|
duplex: "half",
|
|
71
98
|
};
|
|
72
99
|
});
|
|
73
100
|
}
|
|
74
101
|
}
|
|
102
|
+
exports.Node18FormData = Node18FormData;
|
|
75
103
|
/**
|
|
76
104
|
* Form Data Implementation for Node.js 16-18
|
|
77
105
|
*/
|
|
78
|
-
|
|
106
|
+
class Node16FormData {
|
|
79
107
|
setup() {
|
|
80
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
this.fd = new (yield
|
|
109
|
+
this.fd = new (yield Promise.resolve().then(() => __importStar(require("form-data")))).default();
|
|
82
110
|
});
|
|
83
111
|
}
|
|
84
112
|
append(key, value) {
|
|
@@ -113,10 +141,11 @@ export class Node16FormData {
|
|
|
113
141
|
};
|
|
114
142
|
}
|
|
115
143
|
}
|
|
144
|
+
exports.Node16FormData = Node16FormData;
|
|
116
145
|
/**
|
|
117
146
|
* Form Data Implementation for Web
|
|
118
147
|
*/
|
|
119
|
-
|
|
148
|
+
class WebFormData {
|
|
120
149
|
setup() {
|
|
121
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
151
|
this.fd = new FormData();
|
|
@@ -142,3 +171,4 @@ export class WebFormData {
|
|
|
142
171
|
};
|
|
143
172
|
}
|
|
144
173
|
}
|
|
174
|
+
exports.WebFormData = WebFormData;
|
|
@@ -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("./FormDataWrapper"), exports);
|