@humeai/audio-decisions 0.0.1 → 0.1.0
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/LICENSE +21 -0
- package/README.md +411 -2
- package/dist/cjs/BaseClient.d.ts +54 -0
- package/dist/cjs/BaseClient.js +77 -0
- package/dist/cjs/Client.d.ts +29 -0
- package/dist/cjs/Client.js +88 -0
- package/dist/cjs/api/errors/BadRequestError.d.ts +7 -0
- package/dist/cjs/api/errors/BadRequestError.js +54 -0
- package/dist/cjs/api/errors/ContentTooLargeError.d.ts +7 -0
- package/dist/cjs/api/errors/ContentTooLargeError.js +54 -0
- package/dist/cjs/api/errors/ForbiddenError.d.ts +7 -0
- package/dist/cjs/api/errors/ForbiddenError.js +54 -0
- package/dist/cjs/api/errors/InternalServerError.d.ts +7 -0
- package/dist/cjs/api/errors/InternalServerError.js +54 -0
- package/dist/cjs/api/errors/NotFoundError.d.ts +7 -0
- package/dist/cjs/api/errors/NotFoundError.js +54 -0
- package/dist/cjs/api/errors/PaymentRequiredError.d.ts +7 -0
- package/dist/cjs/api/errors/PaymentRequiredError.js +54 -0
- package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +7 -0
- package/dist/cjs/api/errors/ServiceUnavailableError.js +54 -0
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +7 -0
- package/dist/cjs/api/errors/TooManyRequestsError.js +54 -0
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +7 -0
- package/dist/cjs/api/errors/UnauthorizedError.js +54 -0
- package/dist/cjs/api/errors/UnsupportedMediaTypeError.d.ts +7 -0
- package/dist/cjs/api/errors/UnsupportedMediaTypeError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +10 -0
- package/dist/cjs/api/errors/index.js +26 -0
- package/dist/cjs/api/index.d.ts +3 -0
- package/dist/cjs/api/index.js +19 -0
- package/dist/cjs/api/resources/decisions/client/Client.d.ts +284 -0
- package/dist/cjs/api/resources/decisions/client/Client.js +564 -0
- package/dist/cjs/api/resources/decisions/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/decisions/client/index.js +17 -0
- package/dist/cjs/api/resources/decisions/client/requests/DecisionsUpload.d.ts +118 -0
- package/dist/cjs/api/resources/decisions/client/requests/DecisionsUpload.js +3 -0
- package/dist/cjs/api/resources/decisions/client/requests/InputTokensRequest.d.ts +44 -0
- package/dist/cjs/api/resources/decisions/client/requests/InputTokensRequest.js +3 -0
- package/dist/cjs/api/resources/decisions/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/decisions/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/decisions/exports.d.ts +2 -0
- package/dist/cjs/api/resources/decisions/exports.js +21 -0
- package/dist/cjs/api/resources/decisions/index.d.ts +1 -0
- package/dist/cjs/api/resources/decisions/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/index.js +43 -0
- package/dist/cjs/api/resources/runs/client/Client.d.ts +60 -0
- package/dist/cjs/api/resources/runs/client/Client.js +306 -0
- package/dist/cjs/api/resources/runs/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/runs/client/index.js +17 -0
- package/dist/cjs/api/resources/runs/client/requests/GetRunsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/runs/client/requests/GetRunsRequest.js +3 -0
- package/dist/cjs/api/resources/runs/client/requests/ListRunsRequest.d.ts +19 -0
- package/dist/cjs/api/resources/runs/client/requests/ListRunsRequest.js +3 -0
- package/dist/cjs/api/resources/runs/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/runs/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/runs/exports.d.ts +2 -0
- package/dist/cjs/api/resources/runs/exports.js +21 -0
- package/dist/cjs/api/resources/runs/index.d.ts +1 -0
- package/dist/cjs/api/resources/runs/index.js +17 -0
- package/dist/cjs/api/types/Answer.d.ts +19 -0
- package/dist/cjs/api/types/Answer.js +3 -0
- package/dist/cjs/api/types/Answers.d.ts +7 -0
- package/dist/cjs/api/types/Answers.js +3 -0
- package/dist/cjs/api/types/ChoiceAnswer.d.ts +11 -0
- package/dist/cjs/api/types/ChoiceAnswer.js +3 -0
- package/dist/cjs/api/types/ChoiceQuestion.d.ts +10 -0
- package/dist/cjs/api/types/ChoiceQuestion.js +3 -0
- package/dist/cjs/api/types/Criterion.d.ts +9 -0
- package/dist/cjs/api/types/Criterion.js +3 -0
- package/dist/cjs/api/types/DecisionsRequest.d.ts +9 -0
- package/dist/cjs/api/types/DecisionsRequest.js +3 -0
- package/dist/cjs/api/types/DecisionsResponse.d.ts +10 -0
- package/dist/cjs/api/types/DecisionsResponse.js +3 -0
- package/dist/cjs/api/types/ErrorCode.d.ts +58 -0
- package/dist/cjs/api/types/ErrorCode.js +61 -0
- package/dist/cjs/api/types/ErrorType.d.ts +5 -0
- package/dist/cjs/api/types/ErrorType.js +8 -0
- package/dist/cjs/api/types/Error_.d.ts +15 -0
- package/dist/cjs/api/types/Error_.js +3 -0
- package/dist/cjs/api/types/GatewayError.d.ts +9 -0
- package/dist/cjs/api/types/GatewayError.js +3 -0
- package/dist/cjs/api/types/InputTokensResponse.d.ts +7 -0
- package/dist/cjs/api/types/InputTokensResponse.js +3 -0
- package/dist/cjs/api/types/Moment.d.ts +11 -0
- package/dist/cjs/api/types/Moment.js +3 -0
- package/dist/cjs/api/types/MomentAnswer.d.ts +8 -0
- package/dist/cjs/api/types/MomentAnswer.js +3 -0
- package/dist/cjs/api/types/MomentQuestion.d.ts +7 -0
- package/dist/cjs/api/types/MomentQuestion.js +3 -0
- package/dist/cjs/api/types/NoulAnswer.d.ts +7 -0
- package/dist/cjs/api/types/NoulAnswer.js +3 -0
- package/dist/cjs/api/types/NoulCriteria.d.ts +9 -0
- package/dist/cjs/api/types/NoulCriteria.js +3 -0
- package/dist/cjs/api/types/NoulQuestion.d.ts +9 -0
- package/dist/cjs/api/types/NoulQuestion.js +3 -0
- package/dist/cjs/api/types/Question.d.ts +19 -0
- package/dist/cjs/api/types/Question.js +3 -0
- package/dist/cjs/api/types/Questions.d.ts +7 -0
- package/dist/cjs/api/types/Questions.js +3 -0
- package/dist/cjs/api/types/Received.d.ts +7 -0
- package/dist/cjs/api/types/Received.js +3 -0
- package/dist/cjs/api/types/Run.d.ts +18 -0
- package/dist/cjs/api/types/Run.js +3 -0
- package/dist/cjs/api/types/RunReceived.d.ts +9 -0
- package/dist/cjs/api/types/RunReceived.js +3 -0
- package/dist/cjs/api/types/RunStatus.d.ts +6 -0
- package/dist/cjs/api/types/RunStatus.js +9 -0
- package/dist/cjs/api/types/RunSummary.d.ts +16 -0
- package/dist/cjs/api/types/RunSummary.js +3 -0
- package/dist/cjs/api/types/RunsPage.d.ts +10 -0
- package/dist/cjs/api/types/RunsPage.js +3 -0
- package/dist/cjs/api/types/ScoreAnswer.d.ts +13 -0
- package/dist/cjs/api/types/ScoreAnswer.js +3 -0
- package/dist/cjs/api/types/ScoreQuestion.d.ts +9 -0
- package/dist/cjs/api/types/ScoreQuestion.js +3 -0
- package/dist/cjs/api/types/index.d.ts +28 -0
- package/dist/cjs/api/types/index.js +44 -0
- package/dist/cjs/audio-helpers/bytes.d.ts +6 -0
- package/dist/cjs/audio-helpers/bytes.js +38 -0
- package/dist/cjs/audio-helpers/checks.d.ts +2 -0
- package/dist/cjs/audio-helpers/checks.js +25 -0
- package/dist/cjs/audio-helpers/chunks.d.ts +160 -0
- package/dist/cjs/audio-helpers/chunks.js +350 -0
- package/dist/cjs/audio-helpers/downmix.d.ts +17 -0
- package/dist/cjs/audio-helpers/downmix.js +291 -0
- package/dist/cjs/audio-helpers/errors.d.ts +4 -0
- package/dist/cjs/audio-helpers/errors.js +12 -0
- package/dist/cjs/audio-helpers/files.d.ts +27 -0
- package/dist/cjs/audio-helpers/files.js +178 -0
- package/dist/cjs/audio-helpers/index.d.ts +4 -0
- package/dist/cjs/audio-helpers/index.js +11 -0
- package/dist/cjs/audio-helpers/integers.d.ts +3 -0
- package/dist/cjs/audio-helpers/integers.js +26 -0
- package/dist/cjs/audio-helpers/mp3.d.ts +24 -0
- package/dist/cjs/audio-helpers/mp3.js +245 -0
- package/dist/cjs/audio-helpers/results.d.ts +74 -0
- package/dist/cjs/audio-helpers/results.js +187 -0
- package/dist/cjs/audio-helpers/wav.d.ts +21 -0
- package/dist/cjs/audio-helpers/wav.js +167 -0
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +20 -0
- package/dist/cjs/auth/HeaderAuthProvider.js +83 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +8 -0
- package/dist/cjs/core/auth/AuthProvider.js +9 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +33 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +11 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/exports.d.ts +2 -0
- package/dist/cjs/core/exports.js +18 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/APIResponse.js +2 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +56 -0
- package/dist/cjs/core/fetcher/Fetcher.js +275 -0
- package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
- package/dist/cjs/core/fetcher/Headers.js +84 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/cjs/core/fetcher/RawResponse.js +44 -0
- package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/dist/cjs/core/fetcher/Supplier.js +22 -0
- package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +58 -0
- package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
- package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/dist/cjs/core/fetcher/getHeader.js +11 -0
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/cjs/core/fetcher/getRequestBody.js +27 -0
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +17 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +85 -0
- package/dist/cjs/core/fetcher/index.d.ts +13 -0
- package/dist/cjs/core/fetcher/index.js +19 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +173 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +11 -0
- package/dist/cjs/core/fetcher/makeRequest.js +94 -0
- package/dist/cjs/core/fetcher/redactUrl.d.ts +2 -0
- package/dist/cjs/core/fetcher/redactUrl.js +88 -0
- package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/cjs/core/fetcher/requestWithRetries.js +91 -0
- package/dist/cjs/core/fetcher/signals.d.ts +6 -0
- package/dist/cjs/core/fetcher/signals.js +33 -0
- package/dist/cjs/core/file/exports.d.ts +1 -0
- package/dist/cjs/core/file/exports.js +2 -0
- package/dist/cjs/core/file/file.d.ts +10 -0
- package/dist/cjs/core/file/file.js +225 -0
- package/dist/cjs/core/file/index.d.ts +2 -0
- package/dist/cjs/core/file/index.js +18 -0
- package/dist/cjs/core/file/types.d.ts +66 -0
- package/dist/cjs/core/file/types.js +2 -0
- package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +15 -0
- package/dist/cjs/core/form-data-utils/FormDataWrapper.js +192 -0
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
- package/dist/cjs/core/form-data-utils/index.d.ts +2 -0
- package/dist/cjs/core/form-data-utils/index.js +20 -0
- package/dist/cjs/core/headers.d.ts +2 -0
- package/dist/cjs/core/headers.js +31 -0
- package/dist/cjs/core/index.d.ts +9 -0
- package/dist/cjs/core/index.js +48 -0
- package/dist/cjs/core/json.d.ts +15 -0
- package/dist/cjs/core/json.js +24 -0
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/requestBody.d.ts +12 -0
- package/dist/cjs/core/requestBody.js +26 -0
- package/dist/cjs/core/runtime/index.d.ts +1 -0
- package/dist/cjs/core/runtime/index.js +6 -0
- package/dist/cjs/core/runtime/runtime.d.ts +28 -0
- package/dist/cjs/core/runtime/runtime.js +176 -0
- package/dist/cjs/core/schemas/Schema.d.ts +88 -0
- package/dist/cjs/core/schemas/Schema.js +25 -0
- package/dist/cjs/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/bigint/bigint.js +53 -0
- package/dist/cjs/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/bigint/index.js +5 -0
- package/dist/cjs/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/date/date.js +62 -0
- package/dist/cjs/core/schemas/builders/date/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/date/index.js +5 -0
- package/dist/cjs/core/schemas/builders/enum/enum.d.ts +3 -0
- package/dist/cjs/core/schemas/builders/enum/enum.js +45 -0
- package/dist/cjs/core/schemas/builders/enum/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/enum/index.js +6 -0
- package/dist/cjs/core/schemas/builders/index.d.ts +14 -0
- package/dist/cjs/core/schemas/builders/index.js +30 -0
- package/dist/cjs/core/schemas/builders/lazy/index.d.ts +3 -0
- package/dist/cjs/core/schemas/builders/lazy/index.js +7 -0
- package/dist/cjs/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/dist/cjs/core/schemas/builders/lazy/lazy.js +24 -0
- package/dist/cjs/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/cjs/core/schemas/builders/lazy/lazyObject.js +11 -0
- package/dist/cjs/core/schemas/builders/list/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/list/index.js +5 -0
- package/dist/cjs/core/schemas/builders/list/list.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/list/list.js +49 -0
- package/dist/cjs/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/literals/booleanLiteral.js +28 -0
- package/dist/cjs/core/schemas/builders/literals/index.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/literals/index.js +7 -0
- package/dist/cjs/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/literals/stringLiteral.js +28 -0
- package/dist/cjs/core/schemas/builders/object/index.d.ts +6 -0
- package/dist/cjs/core/schemas/builders/object/index.js +11 -0
- package/dist/cjs/core/schemas/builders/object/object.d.ts +3 -0
- package/dist/cjs/core/schemas/builders/object/object.js +354 -0
- package/dist/cjs/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/cjs/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
- package/dist/cjs/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/cjs/core/schemas/builders/object/property.js +15 -0
- package/dist/cjs/core/schemas/builders/object/types.d.ts +31 -0
- package/dist/cjs/core/schemas/builders/object/types.js +2 -0
- package/dist/cjs/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/dist/cjs/core/schemas/builders/object-like/getObjectLikeUtils.js +60 -0
- package/dist/cjs/core/schemas/builders/object-like/index.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/object-like/index.js +6 -0
- package/dist/cjs/core/schemas/builders/object-like/types.d.ts +7 -0
- package/dist/cjs/core/schemas/builders/object-like/types.js +2 -0
- package/dist/cjs/core/schemas/builders/primitives/any.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/any.js +9 -0
- package/dist/cjs/core/schemas/builders/primitives/boolean.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/boolean.js +25 -0
- package/dist/cjs/core/schemas/builders/primitives/index.d.ts +6 -0
- package/dist/cjs/core/schemas/builders/primitives/index.js +15 -0
- package/dist/cjs/core/schemas/builders/primitives/never.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/never.js +14 -0
- package/dist/cjs/core/schemas/builders/primitives/number.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/number.js +25 -0
- package/dist/cjs/core/schemas/builders/primitives/string.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/string.js +25 -0
- package/dist/cjs/core/schemas/builders/primitives/unknown.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/unknown.js +6 -0
- package/dist/cjs/core/schemas/builders/record/index.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/record/index.js +6 -0
- package/dist/cjs/core/schemas/builders/record/record.d.ts +4 -0
- package/dist/cjs/core/schemas/builders/record/record.js +131 -0
- package/dist/cjs/core/schemas/builders/record/types.d.ts +6 -0
- package/dist/cjs/core/schemas/builders/record/types.js +2 -0
- package/dist/cjs/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/cjs/core/schemas/builders/schema-utils/JsonError.js +13 -0
- package/dist/cjs/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/cjs/core/schemas/builders/schema-utils/ParseError.js +13 -0
- package/dist/cjs/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +21 -0
- package/dist/cjs/core/schemas/builders/schema-utils/getSchemaUtils.js +145 -0
- package/dist/cjs/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/dist/cjs/core/schemas/builders/schema-utils/index.js +11 -0
- package/dist/cjs/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/schema-utils/stringifyValidationErrors.js +9 -0
- package/dist/cjs/core/schemas/builders/set/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/set/index.js +5 -0
- package/dist/cjs/core/schemas/builders/set/set.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/set/set.js +43 -0
- package/dist/cjs/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/dist/cjs/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/dist/cjs/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/dist/cjs/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/dist/cjs/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +39 -0
- package/dist/cjs/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/cjs/core/schemas/builders/union/discriminant.js +9 -0
- package/dist/cjs/core/schemas/builders/union/index.d.ts +4 -0
- package/dist/cjs/core/schemas/builders/union/index.js +7 -0
- package/dist/cjs/core/schemas/builders/union/types.d.ts +13 -0
- package/dist/cjs/core/schemas/builders/union/types.js +2 -0
- package/dist/cjs/core/schemas/builders/union/union.d.ts +4 -0
- package/dist/cjs/core/schemas/builders/union/union.js +126 -0
- package/dist/cjs/core/schemas/index.d.ts +2 -0
- package/dist/cjs/core/schemas/index.js +17 -0
- package/dist/cjs/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/cjs/core/schemas/utils/MaybePromise.js +2 -0
- package/dist/cjs/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/dist/cjs/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/dist/cjs/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/dist/cjs/core/schemas/utils/createIdentitySchemaCreator.js +15 -0
- package/dist/cjs/core/schemas/utils/entries.d.ts +1 -0
- package/dist/cjs/core/schemas/utils/entries.js +6 -0
- package/dist/cjs/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/cjs/core/schemas/utils/filterObject.js +13 -0
- package/dist/cjs/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/cjs/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
- package/dist/cjs/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/cjs/core/schemas/utils/isPlainObject.js +15 -0
- package/dist/cjs/core/schemas/utils/keys.d.ts +1 -0
- package/dist/cjs/core/schemas/utils/keys.js +6 -0
- package/dist/cjs/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/cjs/core/schemas/utils/maybeSkipValidation.js +27 -0
- package/dist/cjs/core/schemas/utils/partition.d.ts +1 -0
- package/dist/cjs/core/schemas/utils/partition.js +15 -0
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
- package/dist/cjs/core/url/encodePathParam.d.ts +3 -0
- package/dist/cjs/core/url/encodePathParam.js +27 -0
- package/dist/cjs/core/url/index.d.ts +4 -0
- package/dist/cjs/core/url/index.js +11 -0
- package/dist/cjs/core/url/join.d.ts +1 -0
- package/dist/cjs/core/url/join.js +68 -0
- package/dist/cjs/core/url/qs.d.ts +7 -0
- package/dist/cjs/core/url/qs.js +76 -0
- package/dist/cjs/environments.d.ts +4 -0
- package/dist/cjs/environments.js +7 -0
- package/dist/cjs/errors/DecisionsError.d.ts +15 -0
- package/dist/cjs/errors/DecisionsError.js +53 -0
- package/dist/cjs/errors/DecisionsTimeoutError.d.ts +6 -0
- package/dist/cjs/errors/DecisionsTimeoutError.js +52 -0
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +68 -0
- package/dist/cjs/errors/index.d.ts +2 -0
- package/dist/cjs/errors/index.js +7 -0
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +7 -0
- package/dist/cjs/index.js +49 -0
- package/dist/cjs/serialization/index.d.ts +2 -0
- package/dist/cjs/serialization/index.js +18 -0
- package/dist/cjs/serialization/resources/decisions/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/decisions/client/index.js +17 -0
- package/dist/cjs/serialization/resources/decisions/client/requests/InputTokensRequest.d.ts +12 -0
- package/dist/cjs/serialization/resources/decisions/client/requests/InputTokensRequest.js +44 -0
- package/dist/cjs/serialization/resources/decisions/client/requests/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/decisions/client/requests/index.js +5 -0
- package/dist/cjs/serialization/resources/decisions/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/decisions/index.js +17 -0
- package/dist/cjs/serialization/resources/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/index.js +41 -0
- package/dist/cjs/serialization/types/Answer.d.ts +23 -0
- package/dist/cjs/serialization/types/Answer.js +53 -0
- package/dist/cjs/serialization/types/Answers.d.ts +10 -0
- package/dist/cjs/serialization/types/Answers.js +40 -0
- package/dist/cjs/serialization/types/ChoiceAnswer.d.ts +11 -0
- package/dist/cjs/serialization/types/ChoiceAnswer.js +43 -0
- package/dist/cjs/serialization/types/ChoiceQuestion.d.ts +11 -0
- package/dist/cjs/serialization/types/ChoiceQuestion.js +43 -0
- package/dist/cjs/serialization/types/Criterion.d.ts +10 -0
- package/dist/cjs/serialization/types/Criterion.js +42 -0
- package/dist/cjs/serialization/types/DecisionsRequest.d.ts +11 -0
- package/dist/cjs/serialization/types/DecisionsRequest.js +43 -0
- package/dist/cjs/serialization/types/DecisionsResponse.d.ts +13 -0
- package/dist/cjs/serialization/types/DecisionsResponse.js +45 -0
- package/dist/cjs/serialization/types/ErrorCode.d.ts +7 -0
- package/dist/cjs/serialization/types/ErrorCode.js +54 -0
- package/dist/cjs/serialization/types/ErrorType.d.ts +7 -0
- package/dist/cjs/serialization/types/ErrorType.js +39 -0
- package/dist/cjs/serialization/types/Error_.d.ts +15 -0
- package/dist/cjs/serialization/types/Error_.js +47 -0
- package/dist/cjs/serialization/types/GatewayError.d.ts +10 -0
- package/dist/cjs/serialization/types/GatewayError.js +42 -0
- package/dist/cjs/serialization/types/InputTokensResponse.d.ts +9 -0
- package/dist/cjs/serialization/types/InputTokensResponse.js +41 -0
- package/dist/cjs/serialization/types/Moment.d.ts +11 -0
- package/dist/cjs/serialization/types/Moment.js +43 -0
- package/dist/cjs/serialization/types/MomentAnswer.d.ts +10 -0
- package/dist/cjs/serialization/types/MomentAnswer.js +42 -0
- package/dist/cjs/serialization/types/MomentQuestion.d.ts +9 -0
- package/dist/cjs/serialization/types/MomentQuestion.js +41 -0
- package/dist/cjs/serialization/types/NoulAnswer.d.ts +9 -0
- package/dist/cjs/serialization/types/NoulAnswer.js +41 -0
- package/dist/cjs/serialization/types/NoulCriteria.d.ts +10 -0
- package/dist/cjs/serialization/types/NoulCriteria.js +42 -0
- package/dist/cjs/serialization/types/NoulQuestion.d.ts +11 -0
- package/dist/cjs/serialization/types/NoulQuestion.js +43 -0
- package/dist/cjs/serialization/types/Question.d.ts +23 -0
- package/dist/cjs/serialization/types/Question.js +53 -0
- package/dist/cjs/serialization/types/Questions.d.ts +10 -0
- package/dist/cjs/serialization/types/Questions.js +40 -0
- package/dist/cjs/serialization/types/Received.d.ts +9 -0
- package/dist/cjs/serialization/types/Received.js +41 -0
- package/dist/cjs/serialization/types/Run.d.ts +18 -0
- package/dist/cjs/serialization/types/Run.js +50 -0
- package/dist/cjs/serialization/types/RunReceived.d.ts +10 -0
- package/dist/cjs/serialization/types/RunReceived.js +42 -0
- package/dist/cjs/serialization/types/RunStatus.d.ts +7 -0
- package/dist/cjs/serialization/types/RunStatus.js +39 -0
- package/dist/cjs/serialization/types/RunSummary.d.ts +16 -0
- package/dist/cjs/serialization/types/RunSummary.js +48 -0
- package/dist/cjs/serialization/types/RunsPage.d.ts +11 -0
- package/dist/cjs/serialization/types/RunsPage.js +43 -0
- package/dist/cjs/serialization/types/ScoreAnswer.d.ts +12 -0
- package/dist/cjs/serialization/types/ScoreAnswer.js +44 -0
- package/dist/cjs/serialization/types/ScoreQuestion.d.ts +10 -0
- package/dist/cjs/serialization/types/ScoreQuestion.js +42 -0
- package/dist/cjs/serialization/types/index.d.ts +28 -0
- package/dist/cjs/serialization/types/index.js +44 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/BaseClient.d.mts +54 -0
- package/dist/esm/BaseClient.mjs +40 -0
- package/dist/esm/Client.d.mts +29 -0
- package/dist/esm/Client.mjs +51 -0
- package/dist/esm/api/errors/BadRequestError.d.mts +7 -0
- package/dist/esm/api/errors/BadRequestError.mjs +17 -0
- package/dist/esm/api/errors/ContentTooLargeError.d.mts +7 -0
- package/dist/esm/api/errors/ContentTooLargeError.mjs +17 -0
- package/dist/esm/api/errors/ForbiddenError.d.mts +7 -0
- package/dist/esm/api/errors/ForbiddenError.mjs +17 -0
- package/dist/esm/api/errors/InternalServerError.d.mts +7 -0
- package/dist/esm/api/errors/InternalServerError.mjs +17 -0
- package/dist/esm/api/errors/NotFoundError.d.mts +7 -0
- package/dist/esm/api/errors/NotFoundError.mjs +17 -0
- package/dist/esm/api/errors/PaymentRequiredError.d.mts +7 -0
- package/dist/esm/api/errors/PaymentRequiredError.mjs +17 -0
- package/dist/esm/api/errors/ServiceUnavailableError.d.mts +7 -0
- package/dist/esm/api/errors/ServiceUnavailableError.mjs +17 -0
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +7 -0
- package/dist/esm/api/errors/TooManyRequestsError.mjs +17 -0
- package/dist/esm/api/errors/UnauthorizedError.d.mts +7 -0
- package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
- package/dist/esm/api/errors/UnsupportedMediaTypeError.d.mts +7 -0
- package/dist/esm/api/errors/UnsupportedMediaTypeError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +10 -0
- package/dist/esm/api/errors/index.mjs +10 -0
- package/dist/esm/api/index.d.mts +3 -0
- package/dist/esm/api/index.mjs +3 -0
- package/dist/esm/api/resources/decisions/client/Client.d.mts +284 -0
- package/dist/esm/api/resources/decisions/client/Client.mjs +527 -0
- package/dist/esm/api/resources/decisions/client/index.d.mts +1 -0
- package/dist/esm/api/resources/decisions/client/index.mjs +1 -0
- package/dist/esm/api/resources/decisions/client/requests/DecisionsUpload.d.mts +118 -0
- package/dist/esm/api/resources/decisions/client/requests/DecisionsUpload.mjs +2 -0
- package/dist/esm/api/resources/decisions/client/requests/InputTokensRequest.d.mts +44 -0
- package/dist/esm/api/resources/decisions/client/requests/InputTokensRequest.mjs +2 -0
- package/dist/esm/api/resources/decisions/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/decisions/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/decisions/exports.d.mts +2 -0
- package/dist/esm/api/resources/decisions/exports.mjs +3 -0
- package/dist/esm/api/resources/decisions/index.d.mts +1 -0
- package/dist/esm/api/resources/decisions/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/index.mjs +4 -0
- package/dist/esm/api/resources/runs/client/Client.d.mts +60 -0
- package/dist/esm/api/resources/runs/client/Client.mjs +269 -0
- package/dist/esm/api/resources/runs/client/index.d.mts +1 -0
- package/dist/esm/api/resources/runs/client/index.mjs +1 -0
- package/dist/esm/api/resources/runs/client/requests/GetRunsRequest.d.mts +10 -0
- package/dist/esm/api/resources/runs/client/requests/GetRunsRequest.mjs +2 -0
- package/dist/esm/api/resources/runs/client/requests/ListRunsRequest.d.mts +19 -0
- package/dist/esm/api/resources/runs/client/requests/ListRunsRequest.mjs +2 -0
- package/dist/esm/api/resources/runs/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/runs/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/runs/exports.d.mts +2 -0
- package/dist/esm/api/resources/runs/exports.mjs +3 -0
- package/dist/esm/api/resources/runs/index.d.mts +1 -0
- package/dist/esm/api/resources/runs/index.mjs +1 -0
- package/dist/esm/api/types/Answer.d.mts +19 -0
- package/dist/esm/api/types/Answer.mjs +2 -0
- package/dist/esm/api/types/Answers.d.mts +7 -0
- package/dist/esm/api/types/Answers.mjs +2 -0
- package/dist/esm/api/types/ChoiceAnswer.d.mts +11 -0
- package/dist/esm/api/types/ChoiceAnswer.mjs +2 -0
- package/dist/esm/api/types/ChoiceQuestion.d.mts +10 -0
- package/dist/esm/api/types/ChoiceQuestion.mjs +2 -0
- package/dist/esm/api/types/Criterion.d.mts +9 -0
- package/dist/esm/api/types/Criterion.mjs +2 -0
- package/dist/esm/api/types/DecisionsRequest.d.mts +9 -0
- package/dist/esm/api/types/DecisionsRequest.mjs +2 -0
- package/dist/esm/api/types/DecisionsResponse.d.mts +10 -0
- package/dist/esm/api/types/DecisionsResponse.mjs +2 -0
- package/dist/esm/api/types/ErrorCode.d.mts +58 -0
- package/dist/esm/api/types/ErrorCode.mjs +58 -0
- package/dist/esm/api/types/ErrorType.d.mts +5 -0
- package/dist/esm/api/types/ErrorType.mjs +5 -0
- package/dist/esm/api/types/Error_.d.mts +15 -0
- package/dist/esm/api/types/Error_.mjs +2 -0
- package/dist/esm/api/types/GatewayError.d.mts +9 -0
- package/dist/esm/api/types/GatewayError.mjs +2 -0
- package/dist/esm/api/types/InputTokensResponse.d.mts +7 -0
- package/dist/esm/api/types/InputTokensResponse.mjs +2 -0
- package/dist/esm/api/types/Moment.d.mts +11 -0
- package/dist/esm/api/types/Moment.mjs +2 -0
- package/dist/esm/api/types/MomentAnswer.d.mts +8 -0
- package/dist/esm/api/types/MomentAnswer.mjs +2 -0
- package/dist/esm/api/types/MomentQuestion.d.mts +7 -0
- package/dist/esm/api/types/MomentQuestion.mjs +2 -0
- package/dist/esm/api/types/NoulAnswer.d.mts +7 -0
- package/dist/esm/api/types/NoulAnswer.mjs +2 -0
- package/dist/esm/api/types/NoulCriteria.d.mts +9 -0
- package/dist/esm/api/types/NoulCriteria.mjs +2 -0
- package/dist/esm/api/types/NoulQuestion.d.mts +9 -0
- package/dist/esm/api/types/NoulQuestion.mjs +2 -0
- package/dist/esm/api/types/Question.d.mts +19 -0
- package/dist/esm/api/types/Question.mjs +2 -0
- package/dist/esm/api/types/Questions.d.mts +7 -0
- package/dist/esm/api/types/Questions.mjs +2 -0
- package/dist/esm/api/types/Received.d.mts +7 -0
- package/dist/esm/api/types/Received.mjs +2 -0
- package/dist/esm/api/types/Run.d.mts +18 -0
- package/dist/esm/api/types/Run.mjs +2 -0
- package/dist/esm/api/types/RunReceived.d.mts +9 -0
- package/dist/esm/api/types/RunReceived.mjs +2 -0
- package/dist/esm/api/types/RunStatus.d.mts +6 -0
- package/dist/esm/api/types/RunStatus.mjs +6 -0
- package/dist/esm/api/types/RunSummary.d.mts +16 -0
- package/dist/esm/api/types/RunSummary.mjs +2 -0
- package/dist/esm/api/types/RunsPage.d.mts +10 -0
- package/dist/esm/api/types/RunsPage.mjs +2 -0
- package/dist/esm/api/types/ScoreAnswer.d.mts +13 -0
- package/dist/esm/api/types/ScoreAnswer.mjs +2 -0
- package/dist/esm/api/types/ScoreQuestion.d.mts +9 -0
- package/dist/esm/api/types/ScoreQuestion.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +28 -0
- package/dist/esm/api/types/index.mjs +28 -0
- package/dist/esm/audio-helpers/bytes.d.mts +6 -0
- package/dist/esm/audio-helpers/bytes.mjs +32 -0
- package/dist/esm/audio-helpers/checks.d.mts +2 -0
- package/dist/esm/audio-helpers/checks.mjs +21 -0
- package/dist/esm/audio-helpers/chunks.d.mts +160 -0
- package/dist/esm/audio-helpers/chunks.mjs +346 -0
- package/dist/esm/audio-helpers/downmix.d.mts +17 -0
- package/dist/esm/audio-helpers/downmix.mjs +287 -0
- package/dist/esm/audio-helpers/errors.d.mts +4 -0
- package/dist/esm/audio-helpers/errors.mjs +8 -0
- package/dist/esm/audio-helpers/files.d.mts +27 -0
- package/dist/esm/audio-helpers/files.mjs +173 -0
- package/dist/esm/audio-helpers/index.d.mts +4 -0
- package/dist/esm/audio-helpers/index.mjs +5 -0
- package/dist/esm/audio-helpers/integers.d.mts +3 -0
- package/dist/esm/audio-helpers/integers.mjs +21 -0
- package/dist/esm/audio-helpers/mp3.d.mts +24 -0
- package/dist/esm/audio-helpers/mp3.mjs +239 -0
- package/dist/esm/audio-helpers/results.d.mts +74 -0
- package/dist/esm/audio-helpers/results.mjs +181 -0
- package/dist/esm/audio-helpers/wav.d.mts +21 -0
- package/dist/esm/audio-helpers/wav.mjs +161 -0
- package/dist/esm/auth/HeaderAuthProvider.d.mts +20 -0
- package/dist/esm/auth/HeaderAuthProvider.mjs +46 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +8 -0
- package/dist/esm/core/auth/AuthProvider.mjs +6 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +30 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +4 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/exports.d.mts +2 -0
- package/dist/esm/core/exports.mjs +2 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +19 -0
- package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +56 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +271 -0
- package/dist/esm/core/fetcher/Headers.d.mts +2 -0
- package/dist/esm/core/fetcher/Headers.mjs +82 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
- package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
- package/dist/esm/core/fetcher/Supplier.mjs +19 -0
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +55 -0
- package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
- package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
- package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
- package/dist/esm/core/fetcher/getHeader.mjs +8 -0
- package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/dist/esm/core/fetcher/getRequestBody.mjs +24 -0
- package/dist/esm/core/fetcher/getResponseBody.d.mts +17 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +81 -0
- package/dist/esm/core/fetcher/index.d.mts +13 -0
- package/dist/esm/core/fetcher/index.mjs +7 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +170 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +11 -0
- package/dist/esm/core/fetcher/makeRequest.mjs +87 -0
- package/dist/esm/core/fetcher/redactUrl.d.mts +2 -0
- package/dist/esm/core/fetcher/redactUrl.mjs +84 -0
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/dist/esm/core/fetcher/requestWithRetries.mjs +88 -0
- package/dist/esm/core/fetcher/signals.d.mts +6 -0
- package/dist/esm/core/fetcher/signals.mjs +28 -0
- package/dist/esm/core/file/exports.d.mts +1 -0
- package/dist/esm/core/file/exports.mjs +1 -0
- package/dist/esm/core/file/file.d.mts +10 -0
- package/dist/esm/core/file/file.mjs +188 -0
- package/dist/esm/core/file/index.d.mts +2 -0
- package/dist/esm/core/file/index.mjs +2 -0
- package/dist/esm/core/file/types.d.mts +66 -0
- package/dist/esm/core/file/types.mjs +1 -0
- package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +15 -0
- package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +154 -0
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
- package/dist/esm/core/form-data-utils/index.d.mts +2 -0
- package/dist/esm/core/form-data-utils/index.mjs +2 -0
- package/dist/esm/core/headers.d.mts +2 -0
- package/dist/esm/core/headers.mjs +27 -0
- package/dist/esm/core/index.d.mts +9 -0
- package/dist/esm/core/index.mjs +9 -0
- package/dist/esm/core/json.d.mts +15 -0
- package/dist/esm/core/json.mjs +19 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/requestBody.d.mts +12 -0
- package/dist/esm/core/requestBody.mjs +23 -0
- package/dist/esm/core/runtime/index.d.mts +1 -0
- package/dist/esm/core/runtime/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.d.mts +28 -0
- package/dist/esm/core/runtime/runtime.mjs +172 -0
- package/dist/esm/core/schemas/Schema.d.mts +88 -0
- package/dist/esm/core/schemas/Schema.mjs +22 -0
- package/dist/esm/core/schemas/builders/bigint/bigint.d.mts +2 -0
- package/dist/esm/core/schemas/builders/bigint/bigint.mjs +50 -0
- package/dist/esm/core/schemas/builders/bigint/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/bigint/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/date/date.d.mts +2 -0
- package/dist/esm/core/schemas/builders/date/date.mjs +59 -0
- package/dist/esm/core/schemas/builders/date/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/date/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/enum/enum.d.mts +3 -0
- package/dist/esm/core/schemas/builders/enum/enum.mjs +41 -0
- package/dist/esm/core/schemas/builders/enum/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/enum/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/index.d.mts +14 -0
- package/dist/esm/core/schemas/builders/index.mjs +14 -0
- package/dist/esm/core/schemas/builders/lazy/index.d.mts +3 -0
- package/dist/esm/core/schemas/builders/lazy/index.mjs +2 -0
- package/dist/esm/core/schemas/builders/lazy/lazy.d.mts +5 -0
- package/dist/esm/core/schemas/builders/lazy/lazy.mjs +19 -0
- package/dist/esm/core/schemas/builders/lazy/lazyObject.d.mts +3 -0
- package/dist/esm/core/schemas/builders/lazy/lazyObject.mjs +8 -0
- package/dist/esm/core/schemas/builders/list/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/list/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/list/list.d.mts +2 -0
- package/dist/esm/core/schemas/builders/list/list.mjs +46 -0
- package/dist/esm/core/schemas/builders/literals/booleanLiteral.d.mts +2 -0
- package/dist/esm/core/schemas/builders/literals/booleanLiteral.mjs +25 -0
- package/dist/esm/core/schemas/builders/literals/index.d.mts +2 -0
- package/dist/esm/core/schemas/builders/literals/index.mjs +2 -0
- package/dist/esm/core/schemas/builders/literals/stringLiteral.d.mts +2 -0
- package/dist/esm/core/schemas/builders/literals/stringLiteral.mjs +25 -0
- package/dist/esm/core/schemas/builders/object/index.d.mts +6 -0
- package/dist/esm/core/schemas/builders/object/index.mjs +3 -0
- package/dist/esm/core/schemas/builders/object/object.d.mts +3 -0
- package/dist/esm/core/schemas/builders/object/object.mjs +350 -0
- package/dist/esm/core/schemas/builders/object/objectWithoutOptionalProperties.d.mts +6 -0
- package/dist/esm/core/schemas/builders/object/objectWithoutOptionalProperties.mjs +4 -0
- package/dist/esm/core/schemas/builders/object/property.d.mts +8 -0
- package/dist/esm/core/schemas/builders/object/property.mjs +11 -0
- package/dist/esm/core/schemas/builders/object/types.d.mts +31 -0
- package/dist/esm/core/schemas/builders/object/types.mjs +1 -0
- package/dist/esm/core/schemas/builders/object-like/getObjectLikeUtils.d.mts +9 -0
- package/dist/esm/core/schemas/builders/object-like/getObjectLikeUtils.mjs +56 -0
- package/dist/esm/core/schemas/builders/object-like/index.d.mts +2 -0
- package/dist/esm/core/schemas/builders/object-like/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/object-like/types.d.mts +7 -0
- package/dist/esm/core/schemas/builders/object-like/types.mjs +1 -0
- package/dist/esm/core/schemas/builders/primitives/any.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/any.mjs +6 -0
- package/dist/esm/core/schemas/builders/primitives/boolean.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/boolean.mjs +22 -0
- package/dist/esm/core/schemas/builders/primitives/index.d.mts +6 -0
- package/dist/esm/core/schemas/builders/primitives/index.mjs +6 -0
- package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
- package/dist/esm/core/schemas/builders/primitives/number.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/number.mjs +22 -0
- package/dist/esm/core/schemas/builders/primitives/string.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/string.mjs +22 -0
- package/dist/esm/core/schemas/builders/primitives/unknown.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/unknown.mjs +3 -0
- package/dist/esm/core/schemas/builders/record/index.d.mts +2 -0
- package/dist/esm/core/schemas/builders/record/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/record/record.d.mts +4 -0
- package/dist/esm/core/schemas/builders/record/record.mjs +127 -0
- package/dist/esm/core/schemas/builders/record/types.d.mts +6 -0
- package/dist/esm/core/schemas/builders/record/types.mjs +1 -0
- package/dist/esm/core/schemas/builders/schema-utils/JsonError.d.mts +5 -0
- package/dist/esm/core/schemas/builders/schema-utils/JsonError.mjs +9 -0
- package/dist/esm/core/schemas/builders/schema-utils/ParseError.d.mts +5 -0
- package/dist/esm/core/schemas/builders/schema-utils/ParseError.mjs +9 -0
- package/dist/esm/core/schemas/builders/schema-utils/getSchemaUtils.d.mts +21 -0
- package/dist/esm/core/schemas/builders/schema-utils/getSchemaUtils.mjs +138 -0
- package/dist/esm/core/schemas/builders/schema-utils/index.d.mts +4 -0
- package/dist/esm/core/schemas/builders/schema-utils/index.mjs +3 -0
- package/dist/esm/core/schemas/builders/schema-utils/stringifyValidationErrors.d.mts +2 -0
- package/dist/esm/core/schemas/builders/schema-utils/stringifyValidationErrors.mjs +6 -0
- package/dist/esm/core/schemas/builders/set/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/set/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/set/set.d.mts +2 -0
- package/dist/esm/core/schemas/builders/set/set.mjs +40 -0
- package/dist/esm/core/schemas/builders/undiscriminated-union/index.d.mts +2 -0
- package/dist/esm/core/schemas/builders/undiscriminated-union/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/undiscriminated-union/types.d.mts +4 -0
- package/dist/esm/core/schemas/builders/undiscriminated-union/types.mjs +1 -0
- package/dist/esm/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.mts +3 -0
- package/dist/esm/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.mjs +36 -0
- package/dist/esm/core/schemas/builders/union/discriminant.d.mts +5 -0
- package/dist/esm/core/schemas/builders/union/discriminant.mjs +6 -0
- package/dist/esm/core/schemas/builders/union/index.d.mts +4 -0
- package/dist/esm/core/schemas/builders/union/index.mjs +2 -0
- package/dist/esm/core/schemas/builders/union/types.d.mts +13 -0
- package/dist/esm/core/schemas/builders/union/types.mjs +1 -0
- package/dist/esm/core/schemas/builders/union/union.d.mts +4 -0
- package/dist/esm/core/schemas/builders/union/union.mjs +123 -0
- package/dist/esm/core/schemas/index.d.mts +2 -0
- package/dist/esm/core/schemas/index.mjs +1 -0
- package/dist/esm/core/schemas/utils/MaybePromise.d.mts +1 -0
- package/dist/esm/core/schemas/utils/MaybePromise.mjs +1 -0
- package/dist/esm/core/schemas/utils/addQuestionMarksToNullableProperties.d.mts +7 -0
- package/dist/esm/core/schemas/utils/addQuestionMarksToNullableProperties.mjs +1 -0
- package/dist/esm/core/schemas/utils/createIdentitySchemaCreator.d.mts +2 -0
- package/dist/esm/core/schemas/utils/createIdentitySchemaCreator.mjs +12 -0
- package/dist/esm/core/schemas/utils/entries.d.mts +1 -0
- package/dist/esm/core/schemas/utils/entries.mjs +3 -0
- package/dist/esm/core/schemas/utils/filterObject.d.mts +1 -0
- package/dist/esm/core/schemas/utils/filterObject.mjs +10 -0
- package/dist/esm/core/schemas/utils/getErrorMessageForIncorrectType.d.mts +1 -0
- package/dist/esm/core/schemas/utils/getErrorMessageForIncorrectType.mjs +24 -0
- package/dist/esm/core/schemas/utils/isPlainObject.d.mts +1 -0
- package/dist/esm/core/schemas/utils/isPlainObject.mjs +12 -0
- package/dist/esm/core/schemas/utils/keys.d.mts +1 -0
- package/dist/esm/core/schemas/utils/keys.mjs +3 -0
- package/dist/esm/core/schemas/utils/maybeSkipValidation.d.mts +2 -0
- package/dist/esm/core/schemas/utils/maybeSkipValidation.mjs +24 -0
- package/dist/esm/core/schemas/utils/partition.d.mts +1 -0
- package/dist/esm/core/schemas/utils/partition.mjs +12 -0
- package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
- package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
- package/dist/esm/core/url/encodePathParam.d.mts +3 -0
- package/dist/esm/core/url/encodePathParam.mjs +24 -0
- package/dist/esm/core/url/index.d.mts +4 -0
- package/dist/esm/core/url/index.mjs +4 -0
- package/dist/esm/core/url/join.d.mts +1 -0
- package/dist/esm/core/url/join.mjs +65 -0
- package/dist/esm/core/url/qs.d.mts +7 -0
- package/dist/esm/core/url/qs.mjs +73 -0
- package/dist/esm/environments.d.mts +4 -0
- package/dist/esm/environments.mjs +4 -0
- package/dist/esm/errors/DecisionsError.d.mts +15 -0
- package/dist/esm/errors/DecisionsError.mjs +49 -0
- package/dist/esm/errors/DecisionsTimeoutError.d.mts +6 -0
- package/dist/esm/errors/DecisionsTimeoutError.mjs +15 -0
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +32 -0
- package/dist/esm/errors/index.d.mts +2 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +7 -0
- package/dist/esm/index.mjs +6 -0
- package/dist/esm/serialization/index.d.mts +2 -0
- package/dist/esm/serialization/index.mjs +2 -0
- package/dist/esm/serialization/resources/decisions/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/decisions/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/decisions/client/requests/InputTokensRequest.d.mts +12 -0
- package/dist/esm/serialization/resources/decisions/client/requests/InputTokensRequest.mjs +8 -0
- package/dist/esm/serialization/resources/decisions/client/requests/index.d.mts +1 -0
- package/dist/esm/serialization/resources/decisions/client/requests/index.mjs +1 -0
- package/dist/esm/serialization/resources/decisions/index.d.mts +1 -0
- package/dist/esm/serialization/resources/decisions/index.mjs +1 -0
- package/dist/esm/serialization/resources/index.d.mts +2 -0
- package/dist/esm/serialization/resources/index.mjs +2 -0
- package/dist/esm/serialization/types/Answer.d.mts +23 -0
- package/dist/esm/serialization/types/Answer.mjs +17 -0
- package/dist/esm/serialization/types/Answers.d.mts +10 -0
- package/dist/esm/serialization/types/Answers.mjs +4 -0
- package/dist/esm/serialization/types/ChoiceAnswer.d.mts +11 -0
- package/dist/esm/serialization/types/ChoiceAnswer.mjs +7 -0
- package/dist/esm/serialization/types/ChoiceQuestion.d.mts +11 -0
- package/dist/esm/serialization/types/ChoiceQuestion.mjs +7 -0
- package/dist/esm/serialization/types/Criterion.d.mts +10 -0
- package/dist/esm/serialization/types/Criterion.mjs +6 -0
- package/dist/esm/serialization/types/DecisionsRequest.d.mts +11 -0
- package/dist/esm/serialization/types/DecisionsRequest.mjs +7 -0
- package/dist/esm/serialization/types/DecisionsResponse.d.mts +13 -0
- package/dist/esm/serialization/types/DecisionsResponse.mjs +9 -0
- package/dist/esm/serialization/types/ErrorCode.d.mts +7 -0
- package/dist/esm/serialization/types/ErrorCode.mjs +18 -0
- package/dist/esm/serialization/types/ErrorType.d.mts +7 -0
- package/dist/esm/serialization/types/ErrorType.mjs +3 -0
- package/dist/esm/serialization/types/Error_.d.mts +15 -0
- package/dist/esm/serialization/types/Error_.mjs +11 -0
- package/dist/esm/serialization/types/GatewayError.d.mts +10 -0
- package/dist/esm/serialization/types/GatewayError.mjs +6 -0
- package/dist/esm/serialization/types/InputTokensResponse.d.mts +9 -0
- package/dist/esm/serialization/types/InputTokensResponse.mjs +5 -0
- package/dist/esm/serialization/types/Moment.d.mts +11 -0
- package/dist/esm/serialization/types/Moment.mjs +7 -0
- package/dist/esm/serialization/types/MomentAnswer.d.mts +10 -0
- package/dist/esm/serialization/types/MomentAnswer.mjs +6 -0
- package/dist/esm/serialization/types/MomentQuestion.d.mts +9 -0
- package/dist/esm/serialization/types/MomentQuestion.mjs +5 -0
- package/dist/esm/serialization/types/NoulAnswer.d.mts +9 -0
- package/dist/esm/serialization/types/NoulAnswer.mjs +5 -0
- package/dist/esm/serialization/types/NoulCriteria.d.mts +10 -0
- package/dist/esm/serialization/types/NoulCriteria.mjs +6 -0
- package/dist/esm/serialization/types/NoulQuestion.d.mts +11 -0
- package/dist/esm/serialization/types/NoulQuestion.mjs +7 -0
- package/dist/esm/serialization/types/Question.d.mts +23 -0
- package/dist/esm/serialization/types/Question.mjs +17 -0
- package/dist/esm/serialization/types/Questions.d.mts +10 -0
- package/dist/esm/serialization/types/Questions.mjs +4 -0
- package/dist/esm/serialization/types/Received.d.mts +9 -0
- package/dist/esm/serialization/types/Received.mjs +5 -0
- package/dist/esm/serialization/types/Run.d.mts +18 -0
- package/dist/esm/serialization/types/Run.mjs +14 -0
- package/dist/esm/serialization/types/RunReceived.d.mts +10 -0
- package/dist/esm/serialization/types/RunReceived.mjs +6 -0
- package/dist/esm/serialization/types/RunStatus.d.mts +7 -0
- package/dist/esm/serialization/types/RunStatus.mjs +3 -0
- package/dist/esm/serialization/types/RunSummary.d.mts +16 -0
- package/dist/esm/serialization/types/RunSummary.mjs +12 -0
- package/dist/esm/serialization/types/RunsPage.d.mts +11 -0
- package/dist/esm/serialization/types/RunsPage.mjs +7 -0
- package/dist/esm/serialization/types/ScoreAnswer.d.mts +12 -0
- package/dist/esm/serialization/types/ScoreAnswer.mjs +8 -0
- package/dist/esm/serialization/types/ScoreQuestion.d.mts +10 -0
- package/dist/esm/serialization/types/ScoreQuestion.mjs +6 -0
- package/dist/esm/serialization/types/index.d.mts +28 -0
- package/dist/esm/serialization/types/index.mjs +28 -0
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +114 -8
- package/reference.md +327 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.RunStatus = void 0;
|
|
5
|
+
/** How a run ended: `ended` if it returned answers, and `errored` if it returned none because inference failed or the client closed the connection first. */
|
|
6
|
+
exports.RunStatus = {
|
|
7
|
+
Ended: "ended",
|
|
8
|
+
Errored: "errored",
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as Decisions from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* One model inference, as the list returns it.
|
|
4
|
+
*/
|
|
5
|
+
export interface RunSummary {
|
|
6
|
+
/** The run's ID: the `run_id` of a decisions response. */
|
|
7
|
+
runId: string;
|
|
8
|
+
/** The ID of the Hume user who made the run. */
|
|
9
|
+
userId: string;
|
|
10
|
+
status: Decisions.RunStatus;
|
|
11
|
+
/** When the run started. */
|
|
12
|
+
startedAt: Date;
|
|
13
|
+
/** When the run ended. */
|
|
14
|
+
endedAt: Date;
|
|
15
|
+
received: Decisions.RunReceived;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Decisions from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* One page of runs.
|
|
4
|
+
*/
|
|
5
|
+
export interface RunsPage {
|
|
6
|
+
/** The runs, newest first. */
|
|
7
|
+
runs: Decisions.RunSummary[];
|
|
8
|
+
/** Absent on the last page. Pass it back as `cursor` for the next one. */
|
|
9
|
+
nextCursor?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The answer to a `score` question.
|
|
3
|
+
*/
|
|
4
|
+
export interface ScoreAnswer {
|
|
5
|
+
/** The probability-weighted mean of the level indices, from 0 to the index of the highest level. */
|
|
6
|
+
score: number;
|
|
7
|
+
/** How much human raters would agree, from 0 when the probabilities are at least as spread out as a uniform distribution to 1 when all probability is on one level. */
|
|
8
|
+
confidence: number;
|
|
9
|
+
/** The probability of each level, keyed by level index as a string. Each estimates the share of human raters who would choose the level, and together they sum to 1, within rounding. */
|
|
10
|
+
probabilities: Record<string, number>;
|
|
11
|
+
/** The text of each level, as given in the question's `criteria`, keyed by level index like `probabilities`, so a score can be read without relying on the key order of a JSON object. */
|
|
12
|
+
legend: Record<string, string>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asks where the audio falls on a scale of two or more ordered levels.
|
|
3
|
+
*/
|
|
4
|
+
export interface ScoreQuestion {
|
|
5
|
+
/** The question, written in natural language. */
|
|
6
|
+
instructions: string;
|
|
7
|
+
/** The levels, ordered from lowest to highest and numbered from 0. The model reads each level's text, and the answer's `legend` returns it. A question with fewer than two levels or more than 10, or with duplicate levels, is rejected with `question_invalid`. */
|
|
8
|
+
criteria: string[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from "./Answer.js";
|
|
2
|
+
export * from "./Answers.js";
|
|
3
|
+
export * from "./ChoiceAnswer.js";
|
|
4
|
+
export * from "./ChoiceQuestion.js";
|
|
5
|
+
export * from "./Criterion.js";
|
|
6
|
+
export * from "./DecisionsRequest.js";
|
|
7
|
+
export * from "./DecisionsResponse.js";
|
|
8
|
+
export * from "./Error_.js";
|
|
9
|
+
export * from "./ErrorCode.js";
|
|
10
|
+
export * from "./ErrorType.js";
|
|
11
|
+
export * from "./GatewayError.js";
|
|
12
|
+
export * from "./InputTokensResponse.js";
|
|
13
|
+
export * from "./Moment.js";
|
|
14
|
+
export * from "./MomentAnswer.js";
|
|
15
|
+
export * from "./MomentQuestion.js";
|
|
16
|
+
export * from "./NoulAnswer.js";
|
|
17
|
+
export * from "./NoulCriteria.js";
|
|
18
|
+
export * from "./NoulQuestion.js";
|
|
19
|
+
export * from "./Question.js";
|
|
20
|
+
export * from "./Questions.js";
|
|
21
|
+
export * from "./Received.js";
|
|
22
|
+
export * from "./Run.js";
|
|
23
|
+
export * from "./RunReceived.js";
|
|
24
|
+
export * from "./RunStatus.js";
|
|
25
|
+
export * from "./RunSummary.js";
|
|
26
|
+
export * from "./RunsPage.js";
|
|
27
|
+
export * from "./ScoreAnswer.js";
|
|
28
|
+
export * from "./ScoreQuestion.js";
|
|
@@ -0,0 +1,44 @@
|
|
|
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("./Answer.js"), exports);
|
|
18
|
+
__exportStar(require("./Answers.js"), exports);
|
|
19
|
+
__exportStar(require("./ChoiceAnswer.js"), exports);
|
|
20
|
+
__exportStar(require("./ChoiceQuestion.js"), exports);
|
|
21
|
+
__exportStar(require("./Criterion.js"), exports);
|
|
22
|
+
__exportStar(require("./DecisionsRequest.js"), exports);
|
|
23
|
+
__exportStar(require("./DecisionsResponse.js"), exports);
|
|
24
|
+
__exportStar(require("./Error_.js"), exports);
|
|
25
|
+
__exportStar(require("./ErrorCode.js"), exports);
|
|
26
|
+
__exportStar(require("./ErrorType.js"), exports);
|
|
27
|
+
__exportStar(require("./GatewayError.js"), exports);
|
|
28
|
+
__exportStar(require("./InputTokensResponse.js"), exports);
|
|
29
|
+
__exportStar(require("./Moment.js"), exports);
|
|
30
|
+
__exportStar(require("./MomentAnswer.js"), exports);
|
|
31
|
+
__exportStar(require("./MomentQuestion.js"), exports);
|
|
32
|
+
__exportStar(require("./NoulAnswer.js"), exports);
|
|
33
|
+
__exportStar(require("./NoulCriteria.js"), exports);
|
|
34
|
+
__exportStar(require("./NoulQuestion.js"), exports);
|
|
35
|
+
__exportStar(require("./Question.js"), exports);
|
|
36
|
+
__exportStar(require("./Questions.js"), exports);
|
|
37
|
+
__exportStar(require("./Received.js"), exports);
|
|
38
|
+
__exportStar(require("./Run.js"), exports);
|
|
39
|
+
__exportStar(require("./RunReceived.js"), exports);
|
|
40
|
+
__exportStar(require("./RunStatus.js"), exports);
|
|
41
|
+
__exportStar(require("./RunSummary.js"), exports);
|
|
42
|
+
__exportStar(require("./RunsPage.js"), exports);
|
|
43
|
+
__exportStar(require("./ScoreAnswer.js"), exports);
|
|
44
|
+
__exportStar(require("./ScoreQuestion.js"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function dataView(data: Uint8Array): DataView;
|
|
2
|
+
/** Whether the bytes at `offset` spell `text`, which is ASCII. False when they run past the end. */
|
|
3
|
+
export declare function hasBytes(data: Uint8Array, offset: number, text: string): boolean;
|
|
4
|
+
export declare function writeAscii(data: Uint8Array, offset: number, text: string): void;
|
|
5
|
+
/** The big-endian integer in the 4 bytes from `offset`, or undefined when they do not all lie within `data`. */
|
|
6
|
+
export declare function uint32BE(data: Uint8Array, offset: number): number | undefined;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Maintained by hand and listed in .fernignore, so SDK regeneration leaves it in place.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.dataView = dataView;
|
|
5
|
+
exports.hasBytes = hasBytes;
|
|
6
|
+
exports.writeAscii = writeAscii;
|
|
7
|
+
exports.uint32BE = uint32BE;
|
|
8
|
+
function dataView(data) {
|
|
9
|
+
return new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
10
|
+
}
|
|
11
|
+
/** Whether the bytes at `offset` spell `text`, which is ASCII. False when they run past the end. */
|
|
12
|
+
function hasBytes(data, offset, text) {
|
|
13
|
+
if (offset < 0 || offset + text.length > data.length) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
for (let index = 0; index < text.length; index++) {
|
|
17
|
+
if (data[offset + index] !== text.charCodeAt(index)) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
function writeAscii(data, offset, text) {
|
|
24
|
+
for (let index = 0; index < text.length; index++) {
|
|
25
|
+
data[offset + index] = text.charCodeAt(index);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/** The big-endian integer in the 4 bytes from `offset`, or undefined when they do not all lie within `data`. */
|
|
29
|
+
function uint32BE(data, offset) {
|
|
30
|
+
if (offset < 0 || offset + 4 > data.length) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
let value = 0;
|
|
34
|
+
for (let index = offset; index < offset + 4; index++) {
|
|
35
|
+
value = value * 256 + data[index];
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Maintained by hand and listed in .fernignore, so SDK regeneration leaves it in place.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.checkInteger = checkInteger;
|
|
5
|
+
exports.checkChoice = checkChoice;
|
|
6
|
+
function checkInteger(name, value) {
|
|
7
|
+
// Arithmetic on larger numbers is not exact, and the bounds checked later assume it is.
|
|
8
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value)) {
|
|
9
|
+
throw new TypeError(`${name} must be a safe integer, got ${describe(value)}.`);
|
|
10
|
+
}
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
function checkChoice(name, value, choices) {
|
|
14
|
+
if (!isOneOf(value, choices)) {
|
|
15
|
+
const quoted = choices.map(describe);
|
|
16
|
+
throw new RangeError(`${name} must be ${quoted.slice(0, -1).join(", ")} or ${quoted[quoted.length - 1]}, got ${describe(value)}.`);
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
function isOneOf(value, choices) {
|
|
21
|
+
return choices.includes(value);
|
|
22
|
+
}
|
|
23
|
+
function describe(value) {
|
|
24
|
+
return typeof value === "string" ? JSON.stringify(value) : String(value);
|
|
25
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { Uploadable } from "../core/file/index.js";
|
|
2
|
+
import { type DownmixStrategy } from "./downmix.js";
|
|
3
|
+
declare const SPLITS: readonly ["even", "fixed"];
|
|
4
|
+
export type ChunkSplit = (typeof SPLITS)[number];
|
|
5
|
+
/** One chunk of a longer recording, a complete audio file to send to the Decisions API on its own. */
|
|
6
|
+
export interface AudioChunk {
|
|
7
|
+
/** Position of the chunk in the recording, starting at 0. */
|
|
8
|
+
readonly index: number;
|
|
9
|
+
/**
|
|
10
|
+
* Where the chunk starts in the recording, in milliseconds, rounded to the nearest millisecond.
|
|
11
|
+
* The first chunk of an MP3 file can start a few tens of milliseconds before 0.
|
|
12
|
+
*/
|
|
13
|
+
readonly startMs: number;
|
|
14
|
+
/** Where the chunk ends in the recording, in milliseconds, rounded to the nearest millisecond. */
|
|
15
|
+
readonly endMs: number;
|
|
16
|
+
/** The chunk as a file in the recording's format, after any mixdown `downmixStrategy` asks for. */
|
|
17
|
+
readonly data: Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
export declare namespace iterAudioChunks {
|
|
20
|
+
interface Options {
|
|
21
|
+
/**
|
|
22
|
+
* The longest a chunk can be, in milliseconds, from 1 to 300000. A WAV chunk must also be at
|
|
23
|
+
* most 24,000,000 bytes, which leaves room for the rest of its request within the API's limit
|
|
24
|
+
* of 25,000,000 bytes. 5 minutes of WAV fits only at just under 80,000 bytes per second, and
|
|
25
|
+
* always fits for mono or stereo under "mix". With "even", a WAV file that does not fit is cut
|
|
26
|
+
* into shorter chunks that do. With "fixed", it throws, and 16-bit stereo that is not mixed
|
|
27
|
+
* down needs a `maxChunkMs` of at most 136054 at 44.1 kHz and 124999 at 48 kHz.
|
|
28
|
+
*/
|
|
29
|
+
maxChunkMs: number;
|
|
30
|
+
/** Where in the recording to start, in milliseconds. Defaults to the start of the recording. */
|
|
31
|
+
startMs?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Where in the recording to stop, in milliseconds, no later than the recording's duration.
|
|
34
|
+
* Defaults to the end of the recording.
|
|
35
|
+
*/
|
|
36
|
+
endMs?: number;
|
|
37
|
+
/**
|
|
38
|
+
* "even" for the fewest chunks of equal length, or "fixed" for chunks of `maxChunkMs` with a
|
|
39
|
+
* shorter last chunk. Defaults to "even".
|
|
40
|
+
*/
|
|
41
|
+
split?: ChunkSplit;
|
|
42
|
+
/**
|
|
43
|
+
* How a WAV file is mixed down before it is cut. Audio above 16 kHz is resampled to 16 kHz
|
|
44
|
+
* with the filter the API uses, and audio at 16 kHz or below keeps its rate. Resampled audio
|
|
45
|
+
* is written as 32-bit floating point, the format the API converts every file to, so loud
|
|
46
|
+
* audio cannot clip.
|
|
47
|
+
*
|
|
48
|
+
* 1. "mix", the default, mixes two channels into one the way the API does, adding them at
|
|
49
|
+
* -3 dB each, so the model hears the same audio as it would from the original file. A file
|
|
50
|
+
* that this would not make smaller, such as 16-bit mono at 16 kHz, is cut as it is, and so
|
|
51
|
+
* is audio with more than two channels, or two channels whose header places them anywhere
|
|
52
|
+
* but front left and front right, because the API weighs those channels by the speaker
|
|
53
|
+
* positions the header declares.
|
|
54
|
+
* 2. "first_channel" keeps only the first channel of a file with more than one, so the model
|
|
55
|
+
* hears only that channel. The channel is copied exactly in the recording's sample format
|
|
56
|
+
* when that is no larger than resampling it, as it is at 16 kHz or below for every sample
|
|
57
|
+
* format but 64-bit floating point. Use it when that channel holds the speaker to judge.
|
|
58
|
+
* Mono audio is treated as by "mix".
|
|
59
|
+
* 3. "none" cuts the audio as it is.
|
|
60
|
+
*/
|
|
61
|
+
downmixStrategy?: DownmixStrategy;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** A chunk's place in the recording, with its data left to be copied when it is needed. */
|
|
65
|
+
interface PlannedChunk {
|
|
66
|
+
readonly index: number;
|
|
67
|
+
readonly startMs: number;
|
|
68
|
+
readonly endMs: number;
|
|
69
|
+
readonly build: () => Uint8Array;
|
|
70
|
+
}
|
|
71
|
+
/** A recording's chunks, with the filename and content type its upload would carry. */
|
|
72
|
+
export interface PlannedRecording {
|
|
73
|
+
readonly filename: string | undefined;
|
|
74
|
+
readonly contentType: string | undefined;
|
|
75
|
+
readonly chunks: Iterable<PlannedChunk>;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Splits a recording, or part of one, into chunks short enough for the Decisions API.
|
|
79
|
+
*
|
|
80
|
+
* `maxChunkMs` is the longest a chunk can be, and `split` decides how the recording is divided:
|
|
81
|
+
*
|
|
82
|
+
* 1. "even", the default, cuts the fewest chunks that fit, of equal length, so that the last chunk
|
|
83
|
+
* is not a short remainder: 10 minutes and 1 second at a `maxChunkMs` of 300000 is cut into 3
|
|
84
|
+
* chunks of about 200 seconds.
|
|
85
|
+
* 2. "fixed" makes every chunk `maxChunkMs` long except the last, which holds what remains: the
|
|
86
|
+
* same recording is cut into 2 chunks of 5 minutes and 1 of 1 second. The last chunk is billed
|
|
87
|
+
* for its context and questions like any other, however short it is. Use it when chunks must be
|
|
88
|
+
* the same length across recordings.
|
|
89
|
+
*
|
|
90
|
+
* No chunk is empty. Cuts fall where the format allows, as described below, so `startMs` and
|
|
91
|
+
* `endMs` on each chunk give where it actually starts and ends.
|
|
92
|
+
*
|
|
93
|
+
* The model hears audio at 16 kHz in one channel: the API resamples and mixes down every file
|
|
94
|
+
* before the model hears it. A WAV file is mixed down the same way before it is cut, by default, so
|
|
95
|
+
* that the chunks are smaller to upload while the model hears the same audio. `downmixStrategy`
|
|
96
|
+
* describes how. MP3 files are cut as they are, because they are already compressed.
|
|
97
|
+
*
|
|
98
|
+
* The whole recording is read into memory, mixed down and checked before the first chunk is
|
|
99
|
+
* produced, so that a file that cannot be split is rejected before any chunk is. The options are
|
|
100
|
+
* checked by this call, and the file when iteration starts, so errors about the file are thrown by
|
|
101
|
+
* the first `next()`. The mixdown runs on the calling thread, taking several seconds for an hour of
|
|
102
|
+
* audio above 16 kHz, and pauses regularly to let other work run. Each chunk's `data` is a copy, made
|
|
103
|
+
* as the chunk is produced, so keeping every chunk holds the recording in memory twice.
|
|
104
|
+
*
|
|
105
|
+
* Apart from the WAV mixdown `downmixStrategy` asks for, the audio is copied as it is, never decoded
|
|
106
|
+
* or re-encoded, so cuts fall where the format allows:
|
|
107
|
+
*
|
|
108
|
+
* 1. A WAV file is cut between samples, after the mixdown. With "fixed", a cut can fall up to one
|
|
109
|
+
* sample before `startMs` plus a whole multiple of `maxChunkMs`, so the cuts stay on that grid.
|
|
110
|
+
* Each chunk is a new WAV file in the sample format of the mixed-down audio, holding only its
|
|
111
|
+
* audio; other chunks in the file, such as metadata, are left out.
|
|
112
|
+
* 2. An MP3 file is cut between frames, which last 24 to 72 ms depending on the sample rate, so
|
|
113
|
+
* chunks can differ in length by a frame, and a "fixed" chunk can be up to one frame shorter
|
|
114
|
+
* than `maxChunkMs`. `startMs` and `endMs` move to the nearest frame boundary. A frame can store
|
|
115
|
+
* part of its audio data in the frames before it, and its sound continues from the frame before,
|
|
116
|
+
* so each chunk also starts with the frames its first new frame needs to decode exactly. That is
|
|
117
|
+
* usually a few frames, and up to about 2 seconds at the lowest bitrates. Those frames count
|
|
118
|
+
* toward `maxChunkMs` and repeat the end of the previous chunk, or start before `startMs`. Each
|
|
119
|
+
* chunk holds only the recording's frames; tags, and the header frame that states the whole
|
|
120
|
+
* file's length, are left out. When that header frame has a LAME tag, as files from LAME and
|
|
121
|
+
* ffmpeg do, it states the silence the encoder added at each end, which players skip. Times are
|
|
122
|
+
* then measured from where a player starts the whole file, so the first chunk starts before 0,
|
|
123
|
+
* by about 25 ms for a typical 44.1 kHz file, and the last ends where the player stops.
|
|
124
|
+
*
|
|
125
|
+
* @param file The recording, an MP3 or WAV file, in any form `create` accepts. MP3 files of MPEG-1,
|
|
126
|
+
* 2 and 2.5 layer III are supported, except free format. WAV files of integer PCM (8, 16, 24 or
|
|
127
|
+
* 32-bit) and floating point (32 or 64-bit) are supported, with either the basic or the extensible
|
|
128
|
+
* WAV header. A stream is read from where it is to its end. `{ path }` needs file system access,
|
|
129
|
+
* which browsers do not have.
|
|
130
|
+
* @param options How to cut the recording.
|
|
131
|
+
* @returns The chunks in order. Their times are measured from the start of the recording, not from
|
|
132
|
+
* `startMs`.
|
|
133
|
+
*
|
|
134
|
+
* @throws {TypeError} From this call, if `maxChunkMs`, `startMs` or `endMs` is not a safe integer, or
|
|
135
|
+
* `file` is a string, which is not read as a path.
|
|
136
|
+
* @throws {RangeError} From this call, if `split` is not "even" or "fixed", `downmixStrategy` is not
|
|
137
|
+
* "mix", "first_channel" or "none", `maxChunkMs` is out of range, or `startMs` and `endMs` do not
|
|
138
|
+
* select a range. From iteration, if `startMs` and `endMs` do
|
|
139
|
+
* not select audio within the recording, `maxChunkMs` is too long with "fixed" for a WAV chunk to
|
|
140
|
+
* fit the API's size limit, or too short for an MP3 chunk to hold a new frame and the frames it
|
|
141
|
+
* needs.
|
|
142
|
+
* @throws {UnsupportedAudioError} From iteration, if the recording is empty or not a file this helper supports, such
|
|
143
|
+
* as a compressed WAV or RF64 file. Any damage to an MP3 file is found before the first chunk, so no
|
|
144
|
+
* chunk is produced from a file that cannot be read to the end.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* import { iterAudioChunks } from "@humeai/audio-decisions/audio-helpers";
|
|
148
|
+
*
|
|
149
|
+
* for await (const chunk of iterAudioChunks({ path: "call.wav" }, { maxChunkMs: 60_000 })) {
|
|
150
|
+
* console.log(chunk.index, chunk.startMs, chunk.endMs, chunk.data.length);
|
|
151
|
+
* }
|
|
152
|
+
*/
|
|
153
|
+
export declare function iterAudioChunks(file: Uploadable, options: iterAudioChunks.Options): AsyncGenerator<AudioChunk, void, undefined>;
|
|
154
|
+
/**
|
|
155
|
+
* Checks `options` and `file`, and returns a function that reads the file, mixes it down and plans
|
|
156
|
+
* the chunks `iterAudioChunks` gives, without copying any chunk's data. The function rejects with a
|
|
157
|
+
* DecisionsError if `signal` aborts during the mixdown.
|
|
158
|
+
*/
|
|
159
|
+
export declare function prepareChunks(file: Uploadable, options: iterAudioChunks.Options): (signal?: AbortSignal) => Promise<PlannedRecording>;
|
|
160
|
+
export {};
|