diff --git a/.github/workflows/publish_npm.yaml b/.github/workflows/publish_npm.yaml
index 15af936..9ac9219 100644
--- a/.github/workflows/publish_npm.yaml
+++ b/.github/workflows/publish_npm.yaml
@@ -16,7 +16,8 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
- node-version: '16'
+ node-version: '20'
+ registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
diff --git a/.gitignore b/.gitignore
index f517c79..f86521e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,3 @@
-# This file was generated by liblab | https://liblab.com/
-
# Logs
logs
*.log
@@ -131,4 +129,5 @@ dist
.yarn/install-state.gz
.pnp.*
-.parcel-cache
+.DS_Store
+thumbs.db
diff --git a/.manifest.json b/.manifest.json
index 7c7f930..9fd24e7 100644
--- a/.manifest.json
+++ b/.manifest.json
@@ -1,173 +1,245 @@
{
- "liblabVersion": "1.1.48",
- "date": "2024-07-11T19:30:11.708Z",
+ "liblabVersion": "2.1.22",
+ "date": "2024-07-24T11:19:50.946Z",
"config": {
- "authentication": {},
- "deliveryType": "zip",
+ "apiId": 420,
+ "sdkName": "speechaceapi",
+ "sdkVersion": "1.0.0",
+ "liblabVersion": "2",
+ "deliveryMethods": ["zip"],
"languages": ["typescript"],
- "inputFileName": "/tmp/resources/spec/open-api-spec.json",
- "environmentVariables": [],
- "fileOutput": "/tmp",
- "tempDir": "/tmp/liblab-codegen-1.1.48-tbEm48",
- "inferServiceNames": false,
- "httpLibrary": {
- "name": "axios",
- "packages": {
- "axios": "^1.0.0"
- },
- "languages": ["javascript", "typescript"]
- },
+ "apiVersion": "1.0.0",
+ "apiName": "speechaceapi",
+ "specFilePath": "./Speechace_API.postman_collection.json",
"auth": [],
- "privateRepo": false,
- "githubRef": "",
- "sdkName": "Speechaceapi",
- "sdkVersion": "1.0.0",
- "retry": {
- "enabled": true,
- "maxAttempts": 3,
- "retryDelay": 150
+ "languageOptions": {
+ "typescript": {
+ "bundle": false,
+ "exportClassDefault": false,
+ "httpClient": "axios",
+ "npmName": "",
+ "npmOrg": "",
+ "githubRepoName": "",
+ "ignoreFiles": [],
+ "liblabVersion": "2",
+ "sdkVersion": "1.0.0"
+ }
},
- "customQueries": {
- "paths": [],
- "rawQueries": [],
- "queriesData": []
+ "publishing": {
+ "githubOrg": ""
},
+ "devContainer": false,
"generateEnv": true,
- "npmName": "",
- "npmOrg": "",
- "injectedModels": [],
- "includeWatermark": true,
+ "includeOptionalSnippetParameters": true,
+ "inferServiceNames": false,
"license": {
"type": "MIT",
"name": "MIT",
- "url": "https://opensource.org/licenses/MIT"
+ "url": "https://opensource.org/licenses/MIT",
+ "path": "MIT.ejs"
},
- "ignoreFiles": [".devcontainer"],
- "alwaysInitializeOptionals": false,
- "environments": [],
- "reservedKeywords": {},
- "deliveryMethods": [],
- "bundle": false,
- "exportClassDefault": false,
"responseHeaders": false,
- "renameIllegalModelProperties": false,
- "devContainer": false,
- "strictVersion": false,
- "authors": [],
- "classifiers": [],
- "projectUrls": {},
- "homepage": "",
- "enforceRequestValidation": false,
- "denoteCommon": false,
- "includeOptionalSnippetParameters": true,
- "githubRepoName": "",
- "publishing": {
- "githubOrg": ""
+ "retry": {
+ "enabled": true,
+ "maxAttempts": 3,
+ "retryDelay": 150,
+ "maxDelay": 5000,
+ "retryDelayJitter": 50,
+ "backOffFactor": 2,
+ "httpCodesToRetry": [408, 429, 500, 502, 503, 504],
+ "httpMethodsToRetry": ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]
},
+ "multiTenant": true,
+ "specUrl": "https://dev-liblab-api-stack-specs.s3.us-east-1.amazonaws.com/420/open-api-spec.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA3C2RXH7MWUCMN7ON%2F20240724%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240724T111946Z&X-Amz-Expires=43200&X-Amz-Signature=936c0fd4341fff9f459c33952ea1aa75ad148b800a71c68451a3b25bf8a367b2&X-Amz-SignedHeaders=host&x-id=GetObject",
+ "includeWatermark": true,
+ "language": "typescript",
+ "deliveryMethod": "zip",
"hooks": {
"enabled": false,
"sourceDir": ""
},
- "spec": {
- "type": "postman",
- "version": "2.1"
+ "bundle": false,
+ "exportClassDefault": false,
+ "httpClient": "axios",
+ "npmName": "",
+ "npmOrg": "",
+ "githubRepoName": "",
+ "ignoreFiles": [],
+ "typescriptVersion": "5.3.3",
+ "zodVersion": "3.22.0",
+ "compilerOptions": {
+ "target": "es6",
+ "module": "commonjs",
+ "lib": ["es2017", "dom"]
+ },
+ "usesFormData": false,
+ "authentication": {},
+ "environmentVariables": [],
+ "fileOutput": "/tmp",
+ "httpLibrary": {
+ "name": "axios",
+ "packages": {
+ "axios": "^1.6.8"
+ },
+ "languages": ["typescript"]
},
- "usesFormData": true
+ "customQueries": {
+ "paths": [],
+ "rawQueries": [],
+ "queriesData": []
+ }
},
"files": [
- ".eslintrc.json",
- ".github/PROTECTED_BRANCHES",
- ".github/workflows/build-checks.yml",
- ".github/workflows/pr-checks.yml",
- ".github/workflows/release-checks.yml",
- ".gitignore",
- ".prettierrc.json",
- "LICENSE",
- "README.md",
- "examples/.env.example",
- "examples/README.md",
+ "package.json",
+ "tsconfig.json",
+ "examples/tsconfig.json",
"examples/package.json",
+ "examples/README.md",
"examples/src/index.ts",
- "examples/tsconfig.json",
- "install.sh",
- "jest.config.json",
- "package.json",
- "src/BaseService.ts",
- "src/hooks/Hook.ts",
- "src/http/Environment.ts",
- "src/http/HTTPClient.ts",
- "src/http/HTTPLibrary.ts",
- "src/http/QuerySerializer.ts",
- "src/http/errors/BadGateway.ts",
- "src/http/errors/BadRequest.ts",
- "src/http/errors/Conflict.ts",
- "src/http/errors/ExpectationFailed.ts",
- "src/http/errors/FailedDependency.ts",
- "src/http/errors/Forbidden.ts",
- "src/http/errors/GatewayTimeout.ts",
- "src/http/errors/Gone.ts",
- "src/http/errors/HttpVersionNotSupported.ts",
- "src/http/errors/InternalServerError.ts",
- "src/http/errors/LengthRequired.ts",
- "src/http/errors/Locked.ts",
- "src/http/errors/LoopDetected.ts",
- "src/http/errors/MethodNotAllowed.ts",
- "src/http/errors/MisdirectedRequest.ts",
- "src/http/errors/NetworkAuthenticationRequired.ts",
- "src/http/errors/NotAcceptable.ts",
- "src/http/errors/NotExtended.ts",
- "src/http/errors/NotFound.ts",
- "src/http/errors/NotImplemented.ts",
- "src/http/errors/PayloadTooLarge.ts",
- "src/http/errors/PaymentRequired.ts",
- "src/http/errors/PreconditionFailed.ts",
- "src/http/errors/PreconditionRequired.ts",
- "src/http/errors/ProxyAuthenticationRequired.ts",
- "src/http/errors/RangeNotSatisfiable.ts",
- "src/http/errors/RequestHeaderFieldsTooLarge.ts",
- "src/http/errors/RequestTimeout.ts",
- "src/http/errors/ServiceUnavailable.ts",
- "src/http/errors/TooEarly.ts",
- "src/http/errors/TooManyRequests.ts",
- "src/http/errors/Unauthorized.ts",
- "src/http/errors/UnavailableForLegalReasons.ts",
- "src/http/errors/UnprocessableEntity.ts",
- "src/http/errors/UnsufficientStorage.ts",
- "src/http/errors/UnsupportedMediaType.ts",
- "src/http/errors/UpgradeRequired.ts",
- "src/http/errors/UriTooLong.ts",
- "src/http/errors/VariantAlsoNegotiates.ts",
- "src/http/errors/base.ts",
- "src/http/errors/index.ts",
- "src/http/httpExceptions.ts",
+ "src/http/client.ts",
+ "src/http/serializer.ts",
+ "src/services/v9-latest_/models/score-a-word-or-sentence-request.ts",
+ "src/services/v9-latest_/models/score-a-word-or-sentence-ok-response.ts",
+ "src/services/v9-latest_/models/score-a-phoneme-list-request.ts",
+ "src/services/v9-latest_/models/score-a-phoneme-list-ok-response.ts",
+ "src/services/v9-latest_/models/validate-text-ok-response.ts",
+ "src/services/v9-latest_/models/score-task-request.ts",
+ "src/services/v9-latest_/models/transcribe-score-request.ts",
+ "src/services/v9-latest_/models/transcribe-score-ok-response.ts",
+ "src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-request.ts",
+ "src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-ok-response.ts",
+ "src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-request.ts",
+ "src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-ok-response.ts",
+ "src/services/v1-v7-older-versions_/models/validate-text1-ok-response.ts",
+ "src/services/v1-v7-older-versions_/models/transcribe-score1-request.ts",
+ "src/services/v1-v7-older-versions_/models/transcribe-score1-ok-response.ts",
+ "src/services/v9-latest_/models/score-a-word-or-sentence-ok-response-text-score.ts",
+ "src/services/v9-latest_/models/text-score-cefr-score.ts",
+ "src/services/v9-latest_/models/text-score-fluency-1.ts",
+ "src/services/v9-latest_/models/text-score-ielts-score.ts",
+ "src/services/v9-latest_/models/text-score-pte-score.ts",
+ "src/services/v9-latest_/models/text-score-speechace-score.ts",
+ "src/services/v9-latest_/models/text-score-toeic-score.ts",
+ "src/services/v9-latest_/models/text-score-word-score-list-1.ts",
+ "src/services/v9-latest_/models/fluency-overall-metrics-1.ts",
+ "src/services/v9-latest_/models/fluency-segment-metrics-list-1.ts",
+ "src/services/v9-latest_/models/segment-metrics-list-cefr-score-1.ts",
+ "src/services/v9-latest_/models/segment-metrics-list-speechace-score-1.ts",
+ "src/services/v9-latest_/models/word-score-list-phone-score-list-1.ts",
+ "src/services/v9-latest_/models/word-score-list-syllable-score-list-1.ts",
+ "src/services/v9-latest_/models/score-a-phoneme-list-ok-response-word-score.ts",
+ "src/services/v9-latest_/models/word-score-phone-score-list-1.ts",
+ "src/services/v9-latest_/models/transcribe-score-ok-response-speech-score.ts",
+ "src/services/v9-latest_/models/speech-score-cefr-score.ts",
+ "src/services/v9-latest_/models/coherence.ts",
+ "src/services/v9-latest_/models/speech-score-fluency-1.ts",
+ "src/services/v9-latest_/models/grammar.ts",
+ "src/services/v9-latest_/models/speech-score-ielts-score.ts",
+ "src/services/v9-latest_/models/speech-score-pte-score.ts",
+ "src/services/v9-latest_/models/speech-score-relevance-1.ts",
+ "src/services/v9-latest_/models/score-issue-list.ts",
+ "src/services/v9-latest_/models/speech-score-speechace-score.ts",
+ "src/services/v9-latest_/models/speech-score-toeic-score.ts",
+ "src/services/v9-latest_/models/vocab.ts",
+ "src/services/v9-latest_/models/speech-score-word-score-list-1.ts",
+ "src/services/v9-latest_/models/coherence-overall-metrics.ts",
+ "src/services/v9-latest_/models/adverb-diversity.ts",
+ "src/services/v9-latest_/models/basic-connectives.ts",
+ "src/services/v9-latest_/models/causal-connectives.ts",
+ "src/services/v9-latest_/models/lexical-density.ts",
+ "src/services/v9-latest_/models/negative-connectives.ts",
+ "src/services/v9-latest_/models/pronoun-density.ts",
+ "src/services/v9-latest_/models/verb-diversity.ts",
+ "src/services/v9-latest_/models/fluency-overall-metrics-2.ts",
+ "src/services/v9-latest_/models/fluency-segment-metrics-list-2.ts",
+ "src/services/v9-latest_/models/segment-metrics-list-cefr-score-2.ts",
+ "src/services/v9-latest_/models/segment-metrics-list-ielts-score.ts",
+ "src/services/v9-latest_/models/segment-metrics-list-pte-score.ts",
+ "src/services/v9-latest_/models/segment-metrics-list-speechace-score-2.ts",
+ "src/services/v9-latest_/models/segment-metrics-list-toeic-score.ts",
+ "src/services/v9-latest_/models/errors.ts",
+ "src/services/v9-latest_/models/grammar-overall-metrics.ts",
+ "src/services/v9-latest_/models/grammatical-accuracy.ts",
+ "src/services/v9-latest_/models/grammatical-range.ts",
+ "src/services/v9-latest_/models/length.ts",
+ "src/services/v9-latest_/models/overall-metrics-lexical-diversity-1.ts",
+ "src/services/v9-latest_/models/adverb-modifier-variation.ts",
+ "src/services/v9-latest_/models/noun-phrase-complexity.ts",
+ "src/services/v9-latest_/models/noun-phrase-variation.ts",
+ "src/services/v9-latest_/models/verb-construction-variation.ts",
+ "src/services/v9-latest_/models/vocab-overall-metrics.ts",
+ "src/services/v9-latest_/models/academic-language-use.ts",
+ "src/services/v9-latest_/models/collocation-commonality.ts",
+ "src/services/v9-latest_/models/idiomaticity.ts",
+ "src/services/v9-latest_/models/overall-metrics-lexical-diversity-2.ts",
+ "src/services/v9-latest_/models/word-sophistication.ts",
+ "src/services/v9-latest_/models/word-specificity.ts",
+ "src/services/v9-latest_/models/word-score-list-phone-score-list-2.ts",
+ "src/services/v9-latest_/models/word-score-list-syllable-score-list-2.ts",
+ "src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-ok-response-text-score.ts",
+ "src/services/v1-v7-older-versions_/models/text-score-fluency-2.ts",
+ "src/services/v1-v7-older-versions_/models/word-intonation-list.ts",
+ "src/services/v1-v7-older-versions_/models/text-score-word-score-list-2.ts",
+ "src/services/v1-v7-older-versions_/models/fluency-overall-metrics-3.ts",
+ "src/services/v1-v7-older-versions_/models/fluency-segment-metrics-list-3.ts",
+ "src/services/v1-v7-older-versions_/models/overall-metrics-ielts-subscore-1.ts",
+ "src/services/v1-v7-older-versions_/models/word-score-list-phone-score-list-3.ts",
+ "src/services/v1-v7-older-versions_/models/word-score-list-syllable-score-list-3.ts",
+ "src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-ok-response-word-score.ts",
+ "src/services/v1-v7-older-versions_/models/word-score-phone-score-list-2.ts",
+ "src/services/v1-v7-older-versions_/models/transcribe-score1-ok-response-speech-score.ts",
+ "src/services/v1-v7-older-versions_/models/speech-score-fluency-2.ts",
+ "src/services/v1-v7-older-versions_/models/speech-score-relevance-2.ts",
+ "src/services/v1-v7-older-versions_/models/speech-score-word-score-list-2.ts",
+ "src/services/v1-v7-older-versions_/models/fluency-overall-metrics-4.ts",
+ "src/services/v1-v7-older-versions_/models/fluency-segment-metrics-list-4.ts",
+ "src/services/v1-v7-older-versions_/models/overall-metrics-ielts-subscore-2.ts",
+ "src/services/v1-v7-older-versions_/models/segment-metrics-list-ielts-subscore.ts",
+ "src/services/v1-v7-older-versions_/models/word-score-list-phone-score-list-4.ts",
+ "src/services/v1-v7-older-versions_/models/word-score-list-syllable-score-list-4.ts",
+ ".gitignore",
+ "src/services/base-service.ts",
+ "src/services/v9-latest_/v9-latest_.ts",
+ "src/services/v1-v7-older-versions_/v1-v7-older-versions_.ts",
"src/index.ts",
- "src/models.ts",
- "src/services/README.md",
- "src/services/v1V7OlderVersions/V1V7OlderVersions.ts",
- "src/services/v1V7OlderVersions/index.ts",
- "src/services/v1V7OlderVersions/models/AssessRelevance1Request.ts",
- "src/services/v1V7OlderVersions/models/AssessRelevance1Response.ts",
- "src/services/v1V7OlderVersions/models/ScoreAPhonemeList1Request.ts",
- "src/services/v1V7OlderVersions/models/ScoreAPhonemeList1Response.ts",
- "src/services/v1V7OlderVersions/models/ScoreVocabularyGrammarRequest.ts",
- "src/services/v1V7OlderVersions/models/ScoreVocabularyGrammarResponse.ts",
- "src/services/v1V7OlderVersions/models/ValidateText1Request.ts",
- "src/services/v1V7OlderVersions/models/ValidateText1Response.ts",
- "src/services/v9Latest/V9Latest.ts",
- "src/services/v9Latest/index.ts",
- "src/services/v9Latest/models/GetGrammarVocabCoherenceFeedbackMetricsRequest.ts",
- "src/services/v9Latest/models/GetGrammarVocabCoherenceFeedbackMetricsResponse.ts",
- "src/services/v9Latest/models/PteAnswerQuestionRequest.ts",
- "src/services/v9Latest/models/PteAnswerQuestionResponse.ts",
- "src/services/v9Latest/models/ScoreAPhonemeListRequest.ts",
- "src/services/v9Latest/models/ScoreAPhonemeListResponse.ts",
- "src/services/v9Latest/models/ScoreFluencySpanishRequest.ts",
- "src/services/v9Latest/models/ScoreFluencySpanishResponse.ts",
- "src/services/v9Latest/models/ValidateTextRequest.ts",
- "src/services/v9Latest/models/ValidateTextResponse.ts",
- "test/services/v1V7OlderVersions/V1V7OlderVersions.test.ts",
- "test/services/v9Latest/V9Latest.test.ts",
- "tsconfig.eslint.json",
- "tsconfig.json"
+ "src/http/index.ts",
+ "src/services/v9-latest_/models/index.ts",
+ "src/services/v1-v7-older-versions_/models/index.ts",
+ "src/services/v9-latest_/index.ts",
+ "src/services/v1-v7-older-versions_/index.ts",
+ "src/http/handlers/handler-chain.ts",
+ "src/http/types.ts",
+ "src/http/error.ts",
+ "src/http/handlers/terminating-handler.ts",
+ "src/http/handlers/hook-handler.ts",
+ "src/http/hooks/custom-hook.ts",
+ "src/http/hooks/hook.ts",
+ "src/http/handlers/retry-handler.ts",
+ "src/http/environment.ts",
+ "src/http/handlers/response-validation-handler.ts",
+ "./LICENSE",
+ "src/services/v9-latest_/request-params.ts",
+ "src/services/v1-v7-older-versions_/request-params.ts",
+ "documentation/models/ScoreAWordOrSentenceRequest.md",
+ "documentation/models/ScoreAPhonemeListRequest.md",
+ "documentation/models/ValidateTextOkResponse.md",
+ "documentation/models/ScoreTaskRequest.md",
+ "documentation/models/TranscribeScoreRequest.md",
+ "documentation/models/ScoreAWordOrSentence1Request.md",
+ "documentation/models/ScoreAPhonemeList1Request.md",
+ "documentation/models/ValidateText1OkResponse.md",
+ "documentation/models/TranscribeScore1Request.md",
+ "src/http/handlers/request-validation-handler.ts",
+ "src/http/transport/request.ts",
+ "src/http/transport/request-builder.ts",
+ "documentation/models/ScoreAPhonemeListOkResponse.md",
+ "documentation/models/ScoreAPhonemeList1OkResponse.md",
+ "documentation/services/V1V7OlderVersions_Service.md",
+ "documentation/services/V9Latest_Service.md",
+ "documentation/models/ScoreAWordOrSentence1OkResponse.md",
+ "README.md",
+ "documentation/models/TranscribeScore1OkResponse.md",
+ "documentation/models/ScoreAWordOrSentenceOkResponse.md",
+ "documentation/models/TranscribeScoreOkResponse.md"
]
}
diff --git a/LICENSE b/LICENSE
index 4dc8223..db5ca62 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,5 @@
+MIT License
+
Copyright (c) 2024
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -10,10 +12,10 @@ furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
-OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 1703928..ae5e682 100644
--- a/README.md
+++ b/README.md
@@ -1,474 +1,168 @@
-# Speechaceapi Typescript SDK 1.0.0
+# Speechaceapi TypeScript SDK 1.0.0
-The Typescript SDK for Speechaceapi.
+Welcome to the Speechaceapi SDK documentation. This guide will help you get started with integrating and using the Speechaceapi SDK in your project.
-- API version: 1.0.0
-- SDK version: 1.0.0
+## Versions
-## Table of Contents
-
-- [About the API](#requirements)
-- [Installation](#installation)
-- [API Endpoint Services](#api-endpoint-services)
-- [API Models](#api-models)
-- [Sample Usage](#sample-usage)
-- [Speechaceapi Services](#speechaceapi-services)
-- [License](#license)
+- API version: `1.0.0`
+- SDK version: `1.0.0`
## About the API
[Speechace](https://www.speechace.com) is a Speech Recognition API for fluency and pronunciation assessment. Our patented technology is unique in its ability to score a learner's speech and pinpoint individual syllable and phoneme level mistakes in a user's pronunciation in real time.
-## Installation
-
-```sh
-npm install speechaceapi
-```
-
-## Sample Usage
-
-Here is a simple program demonstrating usage of this SDK. It can also be found in the `examples/src/index.ts` file in this directory.
-
-When running the sample make sure to use `npm install` to install all the dependencies.
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-
- // No simple endpoint service was given
-
-
-```
-
-# Speechaceapi Services
-
-A list of all services and services methods.
-
-- Services
-
- - [V9Latest](#v9latest)
-
- - [V1V7OlderVersions](#v1v7olderversions)
-
-- [All Methods](#all-methods)
-
-## V9Latest
-
-| Method | Description |
-| :---------------------------------------------------------------------------------- | :--------------------------------------------- |
-| [scoreFluencySpanish](#scorefluencyspanish) | Score Fluency - Spanish |
-| [scoreAPhonemeList](#scoreaphonemelist) | Score a Phoneme list |
-| [validateText](#validatetext) | Validate Text |
-| [pteAnswerQuestion](#pteanswerquestion) | PTE Answer Question |
-| [getGrammarVocabCoherenceFeedbackMetrics](#getgrammarvocabcoherencefeedbackmetrics) | Get Grammar, Vocab, Coherence feedback metrics |
-
-## V1V7OlderVersions
-
-| Method | Description |
-| :------------------------------------------------ | :------------------------- |
-| [scoreVocabularyGrammar](#scorevocabularygrammar) | Score Vocabulary & Grammar |
-| [scoreAPhonemeList1](#scoreaphonemelist1) | Score a Phoneme list |
-| [validateText1](#validatetext1) | Validate Text |
-| [assessRelevance1](#assessrelevance1) | Assess Relevance |
-
-## All Methods
-
-### **scoreFluencySpanish**
-
-Score Fluency - Spanish
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/text/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------ | :----- | :------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| dialect | string | The dialect to use for scoring. Supported values are: en-us, en-gb, fr-fr, fr-ca |
-
-**Return Type**
-
-ScoreFluencySpanishResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.scoreFluencySpanish(input, {
- key: '{{speechace_prokey}}',
- dialect: 'es-es',
- });
- console.log(result);
-})();
-
-```
-
-### **scoreAPhonemeList**
-
-Score a Phoneme list
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/phone_list/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------ | :----- | :-------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| userId | string | Optional: A unique anonymized identifier for the end-user who spoke the audio. |
-| dialect | string | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
-
-**Return Type**
-
-ScoreAPhonemeListResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.scoreAPhonemeList(input, {
- key: '{{speechacekey}}',
- userId: 'XYZ-ABC-99001',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **validateText**
-
-Validate Text
-
-- HTTP Method: POST
-- Endpoint: /api/validating/text/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------ | :----- | :------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| text | string | A sentence or sequence of words to validate. |
-| dialect | string | The dialect to use for validation. Default is "en-us". Supported values are "en-us" (US English) and "en-gb" (UK English). |
-
-**Return Type**
-
-ValidateTextResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.validateText(input, {
- key: '{{speechacekey}}',
- text: '"Validate these words existeee."',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **pteAnswerQuestion**
-
-PTE Answer Question
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/task/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------- | :----- | :---------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace |
-| taskType | string | The task_type to score. Supported types are: describe-image, retell-lecture, answer-question. |
-| dialect | string | The dialect to use for scoring. Supported values are: en-us, en-gb, fr-fr, fr-ca, es-es, es-mx. |
-
-**Return Type**
-
-PteAnswerQuestionResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.pteAnswerQuestion(input, {
- key: '{{speechace_premiumkey}}',
- taskType: 'answer-question',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **getGrammarVocabCoherenceFeedbackMetrics**
-
-Get Grammar, Vocab, Coherence feedback metrics
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/speech/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------ | :----- | :------------------------------------------------------------------------------------------------------------ |
-| key | string | API key issued by Speechace. |
-| userId | string | A unique anonymized identifier for the end-user who spoke the audio. |
-| dialect | string | Optional: The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
-
-**Return Type**
-
-GetGrammarVocabCoherenceFeedbackMetricsResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.getGrammarVocabCoherenceFeedbackMetrics(input, {
- key: '{{speechace_premiumkey}}',
- userId: 'XYZ-ABC-99001',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **scoreVocabularyGrammar**
-
-Score Vocabulary & Grammar
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/text/v0.5/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------ | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| userId | string | A unique anonymized identifier for the end-user who spoke the audio. \n\nStructure this field to include as much info as possible to aid in reporting and analytics.\n\nFor example: **user_id=XYZ-ABC-99001** where:\n \n_ XYZ is an id for your Product or App\n_ ABC is an id for the customer/site/account\n\* 99001 is an id for the end-user\n\nEnsure user_id is unique and anonymized containing **no personally identifiable information**. |
-| dialect | string | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).\n\nen-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?` |
-
-**Return Type**
-
-ScoreVocabularyGrammarResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v1V7OlderVersions.scoreVocabularyGrammar(input, {
- key: '{{speechace_premiumkey}}',
- userId: 'XYZ-ABC-99001',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **scoreAPhonemeList1**
-
-Score a Phoneme list
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/phone_list/v0.5/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------ | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| userId | string | A unique anonymized identifier for the end-user who spoke the audio. \n\nStructure this field to include as much info as possible to aid in reporting and analytics.\n\nFor example: **user_id=XYZ-ABC-99001** where:\n \n_ XYZ is an id for your Product or App\n_ ABC is an id for the customer/site/account\n\* 99001 is an id for the end-user\n\nEnsure user_id is unique and anonymized containing **no personally identifiable information**. |
-| dialect | string | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).\n\nen-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?` |
-
-**Return Type**
-
-ScoreAPhonemeList1Response
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v1V7OlderVersions.scoreAPhonemeList1(input, {
- key: '{{speechacekey}}',
- userId: 'XYZ-ABC-99001',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **validateText1**
-
-Validate Text
-
-- HTTP Method: POST
-- Endpoint: /api/validating/text/v0.5/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------ | :----- | :------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| text | string | A sentence or sequence of words to validate. |
-| dialect | string | The dialect to use for validation. Default is "en-us". Supported values are "en-us" (US English) and "en-gb" (UK English). |
+## Table of Contents
-**Return Type**
+- [Setup & Configuration](#setup--configuration)
+ - [Supported Language Versions](#supported-language-versions)
+ - [Installation](#installation)
+- [Services](#services)
+- [Models](#models)
+- [License](#license)
-ValidateText1Response
+# Setup & Configuration
-**Example Usage Code Snippet**
+## Supported Language Versions
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
+This SDK is compatible with the following versions: `TypeScript >= 4.8.4`
-const sdk = new Speechaceapi();
+## Installation
-(async () => {
- const input = {};
- const result = await sdk.v1V7OlderVersions.validateText1(input, {
- key: '{{speechacekey}}',
- text: '"Validate these words existeee."',
- dialect: 'en-us',
- });
- console.log(result);
-})();
+To get started with the SDK, we recommend installing using `npm`:
+```bash
+npm install speechaceapi
```
-### **assessRelevance1**
-
-Assess Relevance
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/speech/v0.5/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. ```{optionalParam1 : 'value1', optionalParam2: 'value2'}```
-
-| Name | Type | Description |
-| :------ | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| dialect | string | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
-| userId | string | A unique anonymized identifier for the end-user who spoke the audio. \nStructure this field to include as much info as possible to aid in reporting and analytics.\nFor example: **user_id=XYZ-ABC-99001** where:\n \n_ XYZ is an id for your Product or App\n_ ABC is an id for the customer/site/account\n\* 99001 is an id for the end-user\nEnsure user_id is unique and anonymized containing **no personally identifiable information**. |
-
-**Return Type**
-
-AssessRelevance1Response
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v1V7OlderVersions.assessRelevance1(input, {
- key: '{{speechace_premiumkey}}',
- dialect: 'en-us',
- userId: 'XYZ-ABC-99001',
- });
- console.log(result);
-})();
-
-```
+## Services
+
+The SDK provides various services to interact with the API.
+
+
+Below is a list of all available services with links to their detailed documentation:
+
+| Name |
+| :------------------------------------------------------------------------------- |
+| [V9Latest_Service](documentation/services/V9Latest_Service.md) |
+| [V1V7OlderVersions_Service](documentation/services/V1V7OlderVersions_Service.md) |
+
+
+
+## Models
+
+The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
+
+
+Below is a list of all available models with links to their detailed documentation:
+
+| Name | Description |
+| :----------------------------------------------------------------------------------------------------------- | :---------- |
+| [ScoreAWordOrSentenceRequest](documentation/models/ScoreAWordOrSentenceRequest.md) | |
+| [ScoreAWordOrSentenceOkResponse](documentation/models/ScoreAWordOrSentenceOkResponse.md) | |
+| [ScoreAPhonemeListRequest](documentation/models/ScoreAPhonemeListRequest.md) | |
+| [ScoreAPhonemeListOkResponse](documentation/models/ScoreAPhonemeListOkResponse.md) | |
+| [ValidateTextOkResponse](documentation/models/ValidateTextOkResponse.md) | |
+| [ScoreTaskRequest](documentation/models/ScoreTaskRequest.md) | |
+| [TranscribeScoreRequest](documentation/models/TranscribeScoreRequest.md) | |
+| [TranscribeScoreOkResponse](documentation/models/TranscribeScoreOkResponse.md) | |
+| [ScoreAWordOrSentence1Request](documentation/models/ScoreAWordOrSentence1Request.md) | |
+| [ScoreAWordOrSentence1OkResponse](documentation/models/ScoreAWordOrSentence1OkResponse.md) | |
+| [ScoreAPhonemeList1Request](documentation/models/ScoreAPhonemeList1Request.md) | |
+| [ScoreAPhonemeList1OkResponse](documentation/models/ScoreAPhonemeList1OkResponse.md) | |
+| [ValidateText1OkResponse](documentation/models/ValidateText1OkResponse.md) | |
+| [TranscribeScore1Request](documentation/models/TranscribeScore1Request.md) | |
+| [TranscribeScore1OkResponse](documentation/models/TranscribeScore1OkResponse.md) | |
+| [ScoreAWordOrSentenceOkResponseTextScore](documentation/models/ScoreAWordOrSentenceOkResponseTextScore.md) | |
+| [TextScoreCefrScore](documentation/models/TextScoreCefrScore.md) | |
+| [TextScoreFluency1](documentation/models/TextScoreFluency1.md) | |
+| [TextScoreIeltsScore](documentation/models/TextScoreIeltsScore.md) | |
+| [TextScorePteScore](documentation/models/TextScorePteScore.md) | |
+| [TextScoreSpeechaceScore](documentation/models/TextScoreSpeechaceScore.md) | |
+| [TextScoreToeicScore](documentation/models/TextScoreToeicScore.md) | |
+| [TextScoreWordScoreList1](documentation/models/TextScoreWordScoreList1.md) | |
+| [FluencyOverallMetrics1](documentation/models/FluencyOverallMetrics1.md) | |
+| [FluencySegmentMetricsList1](documentation/models/FluencySegmentMetricsList1.md) | |
+| [SegmentMetricsListCefrScore1](documentation/models/SegmentMetricsListCefrScore1.md) | |
+| [SegmentMetricsListSpeechaceScore1](documentation/models/SegmentMetricsListSpeechaceScore1.md) | |
+| [WordScoreListPhoneScoreList1](documentation/models/WordScoreListPhoneScoreList1.md) | |
+| [WordScoreListSyllableScoreList1](documentation/models/WordScoreListSyllableScoreList1.md) | |
+| [ScoreAPhonemeListOkResponseWordScore](documentation/models/ScoreAPhonemeListOkResponseWordScore.md) | |
+| [WordScorePhoneScoreList1](documentation/models/WordScorePhoneScoreList1.md) | |
+| [TranscribeScoreOkResponseSpeechScore](documentation/models/TranscribeScoreOkResponseSpeechScore.md) | |
+| [SpeechScoreCefrScore](documentation/models/SpeechScoreCefrScore.md) | |
+| [Coherence](documentation/models/Coherence.md) | |
+| [SpeechScoreFluency1](documentation/models/SpeechScoreFluency1.md) | |
+| [Grammar](documentation/models/Grammar.md) | |
+| [SpeechScoreIeltsScore](documentation/models/SpeechScoreIeltsScore.md) | |
+| [SpeechScorePteScore](documentation/models/SpeechScorePteScore.md) | |
+| [SpeechScoreRelevance1](documentation/models/SpeechScoreRelevance1.md) | |
+| [ScoreIssueList](documentation/models/ScoreIssueList.md) | |
+| [SpeechScoreSpeechaceScore](documentation/models/SpeechScoreSpeechaceScore.md) | |
+| [SpeechScoreToeicScore](documentation/models/SpeechScoreToeicScore.md) | |
+| [Vocab](documentation/models/Vocab.md) | |
+| [SpeechScoreWordScoreList1](documentation/models/SpeechScoreWordScoreList1.md) | |
+| [CoherenceOverallMetrics](documentation/models/CoherenceOverallMetrics.md) | |
+| [AdverbDiversity](documentation/models/AdverbDiversity.md) | |
+| [BasicConnectives](documentation/models/BasicConnectives.md) | |
+| [CausalConnectives](documentation/models/CausalConnectives.md) | |
+| [LexicalDensity](documentation/models/LexicalDensity.md) | |
+| [NegativeConnectives](documentation/models/NegativeConnectives.md) | |
+| [PronounDensity](documentation/models/PronounDensity.md) | |
+| [VerbDiversity](documentation/models/VerbDiversity.md) | |
+| [FluencyOverallMetrics2](documentation/models/FluencyOverallMetrics2.md) | |
+| [FluencySegmentMetricsList2](documentation/models/FluencySegmentMetricsList2.md) | |
+| [SegmentMetricsListCefrScore2](documentation/models/SegmentMetricsListCefrScore2.md) | |
+| [SegmentMetricsListIeltsScore](documentation/models/SegmentMetricsListIeltsScore.md) | |
+| [SegmentMetricsListPteScore](documentation/models/SegmentMetricsListPteScore.md) | |
+| [SegmentMetricsListSpeechaceScore2](documentation/models/SegmentMetricsListSpeechaceScore2.md) | |
+| [SegmentMetricsListToeicScore](documentation/models/SegmentMetricsListToeicScore.md) | |
+| [Errors](documentation/models/Errors.md) | |
+| [GrammarOverallMetrics](documentation/models/GrammarOverallMetrics.md) | |
+| [GrammaticalAccuracy](documentation/models/GrammaticalAccuracy.md) | |
+| [GrammaticalRange](documentation/models/GrammaticalRange.md) | |
+| [Length](documentation/models/Length.md) | |
+| [OverallMetricsLexicalDiversity1](documentation/models/OverallMetricsLexicalDiversity1.md) | |
+| [AdverbModifierVariation](documentation/models/AdverbModifierVariation.md) | |
+| [NounPhraseComplexity](documentation/models/NounPhraseComplexity.md) | |
+| [NounPhraseVariation](documentation/models/NounPhraseVariation.md) | |
+| [VerbConstructionVariation](documentation/models/VerbConstructionVariation.md) | |
+| [VocabOverallMetrics](documentation/models/VocabOverallMetrics.md) | |
+| [AcademicLanguageUse](documentation/models/AcademicLanguageUse.md) | |
+| [CollocationCommonality](documentation/models/CollocationCommonality.md) | |
+| [Idiomaticity](documentation/models/Idiomaticity.md) | |
+| [OverallMetricsLexicalDiversity2](documentation/models/OverallMetricsLexicalDiversity2.md) | |
+| [WordSophistication](documentation/models/WordSophistication.md) | |
+| [WordSpecificity](documentation/models/WordSpecificity.md) | |
+| [WordScoreListPhoneScoreList2](documentation/models/WordScoreListPhoneScoreList2.md) | |
+| [WordScoreListSyllableScoreList2](documentation/models/WordScoreListSyllableScoreList2.md) | |
+| [ScoreAWordOrSentence1OkResponseTextScore](documentation/models/ScoreAWordOrSentence1OkResponseTextScore.md) | |
+| [TextScoreFluency2](documentation/models/TextScoreFluency2.md) | |
+| [WordIntonationList](documentation/models/WordIntonationList.md) | |
+| [TextScoreWordScoreList2](documentation/models/TextScoreWordScoreList2.md) | |
+| [FluencyOverallMetrics3](documentation/models/FluencyOverallMetrics3.md) | |
+| [FluencySegmentMetricsList3](documentation/models/FluencySegmentMetricsList3.md) | |
+| [OverallMetricsIeltsSubscore1](documentation/models/OverallMetricsIeltsSubscore1.md) | |
+| [WordScoreListPhoneScoreList3](documentation/models/WordScoreListPhoneScoreList3.md) | |
+| [WordScoreListSyllableScoreList3](documentation/models/WordScoreListSyllableScoreList3.md) | |
+| [ScoreAPhonemeList1OkResponseWordScore](documentation/models/ScoreAPhonemeList1OkResponseWordScore.md) | |
+| [WordScorePhoneScoreList2](documentation/models/WordScorePhoneScoreList2.md) | |
+| [TranscribeScore1OkResponseSpeechScore](documentation/models/TranscribeScore1OkResponseSpeechScore.md) | |
+| [SpeechScoreFluency2](documentation/models/SpeechScoreFluency2.md) | |
+| [SpeechScoreRelevance2](documentation/models/SpeechScoreRelevance2.md) | |
+| [SpeechScoreWordScoreList2](documentation/models/SpeechScoreWordScoreList2.md) | |
+| [FluencyOverallMetrics4](documentation/models/FluencyOverallMetrics4.md) | |
+| [FluencySegmentMetricsList4](documentation/models/FluencySegmentMetricsList4.md) | |
+| [OverallMetricsIeltsSubscore2](documentation/models/OverallMetricsIeltsSubscore2.md) | |
+| [SegmentMetricsListIeltsSubscore](documentation/models/SegmentMetricsListIeltsSubscore.md) | |
+| [WordScoreListPhoneScoreList4](documentation/models/WordScoreListPhoneScoreList4.md) | |
+| [WordScoreListSyllableScoreList4](documentation/models/WordScoreListSyllableScoreList4.md) | |
+
+
## License
-License: MIT. See license in LICENSE.
+This SDK is licensed under the MIT License.
+
+See the [LICENSE](LICENSE) file for more details.
diff --git a/documentation/models/ScoreAPhonemeList1OkResponse.md b/documentation/models/ScoreAPhonemeList1OkResponse.md
new file mode 100644
index 0000000..981c1f7
--- /dev/null
+++ b/documentation/models/ScoreAPhonemeList1OkResponse.md
@@ -0,0 +1,34 @@
+# ScoreAPhonemeList1OkResponse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :------------------------------------ | :------- | :---------- |
+| quotaRemaining | number | ❌ | |
+| status | string | ❌ | |
+| version | string | ❌ | |
+| wordScore | ScoreAPhonemeList1OkResponseWordScore | ❌ | |
+
+# ScoreAPhonemeList1OkResponseWordScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :------------------------- | :------- | :---------- |
+| phoneScoreList | WordScorePhoneScoreList2[] | ❌ | |
+| qualityScore | number | ❌ | |
+| word | string | ❌ | |
+
+# WordScorePhoneScoreList2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| phone | string | ❌ | |
+| qualityScore | number | ❌ | |
+| soundMostLike | string | ❌ | |
+| stressLevel | any | ❌ | |
+
+
diff --git a/documentation/models/ScoreAPhonemeList1Request.md b/documentation/models/ScoreAPhonemeList1Request.md
new file mode 100644
index 0000000..0bde0ed
--- /dev/null
+++ b/documentation/models/ScoreAPhonemeList1Request.md
@@ -0,0 +1,11 @@
+# ScoreAPhonemeList1Request
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :---------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| phoneList | string | ❌ | A phoneme list to score. |
+| questionInfo | string | ❌ | A unique identifier for the activity or question this user audio is answering. Structure this field to include as much info as possible to aid in reporting and analytics. For example: **question_info='u1/q1'** where: _ u1: means the question belongs to Unit 1 in your content _ q1: means this is question 1 within the unit You can add more levels as needed. Ensure **no personally identifiable information** is passed in this field. |
+| userAudioFile | ArrayBuffer | ❌ | file with user audio (wav, mp3, m4a, webm, ogg, aiff) |
+
+
diff --git a/documentation/models/ScoreAPhonemeListOkResponse.md b/documentation/models/ScoreAPhonemeListOkResponse.md
new file mode 100644
index 0000000..ad42f22
--- /dev/null
+++ b/documentation/models/ScoreAPhonemeListOkResponse.md
@@ -0,0 +1,34 @@
+# ScoreAPhonemeListOkResponse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :----------------------------------- | :------- | :---------- |
+| quotaRemaining | number | ❌ | |
+| status | string | ❌ | |
+| version | string | ❌ | |
+| wordScore | ScoreAPhonemeListOkResponseWordScore | ❌ | |
+
+# ScoreAPhonemeListOkResponseWordScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :------------------------- | :------- | :---------- |
+| phoneScoreList | WordScorePhoneScoreList1[] | ❌ | |
+| qualityScore | number | ❌ | |
+| word | string | ❌ | |
+
+# WordScorePhoneScoreList1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| phone | string | ❌ | |
+| qualityScore | number | ❌ | |
+| soundMostLike | string | ❌ | |
+| stressLevel | any | ❌ | |
+
+
diff --git a/documentation/models/ScoreAPhonemeListRequest.md b/documentation/models/ScoreAPhonemeListRequest.md
new file mode 100644
index 0000000..3b540f8
--- /dev/null
+++ b/documentation/models/ScoreAPhonemeListRequest.md
@@ -0,0 +1,11 @@
+# ScoreAPhonemeListRequest
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :---------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| phoneList | string | ❌ | A phoneme list to score. |
+| questionInfo | string | ❌ | A unique identifier for the activity or question this user audio is answering. Structure this field to include as much info as possible to aid in reporting and analytics. For example: **question_info='u1/q1'** where: _ u1: means the question belongs to Unit 1 in your content _ q1: means this is question 1 within the unit You can add more levels as needed. Ensure **no personally identifiable information** is passed in this field. |
+| userAudioFile | ArrayBuffer | ❌ | file with user audio (wav, mp3, m4a, webm, ogg, aiff) |
+
+
diff --git a/documentation/models/ScoreAWordOrSentence1OkResponse.md b/documentation/models/ScoreAWordOrSentence1OkResponse.md
new file mode 100644
index 0000000..15b3eb1
--- /dev/null
+++ b/documentation/models/ScoreAWordOrSentence1OkResponse.md
@@ -0,0 +1,143 @@
+# ScoreAWordOrSentence1OkResponse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :--------------------------------------- | :------- | :---------- |
+| quotaRemaining | number | ❌ | |
+| status | string | ❌ | |
+| textScore | ScoreAWordOrSentence1OkResponseTextScore | ❌ | |
+| version | string | ❌ | |
+
+# ScoreAWordOrSentence1OkResponseTextScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------- | :------------------------ | :------- | :---------- |
+| fidelityClass | string | ❌ | |
+| fluency | TextScoreFluency2 | ❌ | |
+| qualityScore | number | ❌ | |
+| text | string | ❌ | |
+| wordIntonationList | WordIntonationList[] | ❌ | |
+| wordScoreList | TextScoreWordScoreList2[] | ❌ | |
+
+# TextScoreFluency2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :--------------------------- | :------- | :---------- |
+| fluencyVersion | any | ❌ | |
+| ieltsSubscoreVersion | any | ❌ | |
+| overallMetrics | FluencyOverallMetrics3 | ❌ | |
+| segmentMetricsList | FluencySegmentMetricsList3[] | ❌ | |
+
+# FluencyOverallMetrics3
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------------- | :--------------------------- | :------- | :---------- |
+| allPauseCount | number | ❌ | |
+| allPauseDuration | number | ❌ | |
+| allPauseList | number[][] | ❌ | |
+| articulationLength | number | ❌ | |
+| articulationRate | number | ❌ | |
+| correctSyllableCount | number | ❌ | |
+| correctWordCount | number | ❌ | |
+| duration | number | ❌ | |
+| fluencyScore | number | ❌ | |
+| ieltsEstimate | number | ❌ | |
+| ieltsSubscore | OverallMetricsIeltsSubscore1 | ❌ | |
+| maxLengthRun | number | ❌ | |
+| meanLengthRun | number | ❌ | |
+| pteEstimate | number | ❌ | |
+| segment | number[] | ❌ | |
+| speechRate | number | ❌ | |
+| syllableCorrectPerMinute | number | ❌ | |
+| syllableCount | number | ❌ | |
+| wordCorrectPerMinute | number | ❌ | |
+| wordCount | number | ❌ | |
+
+# OverallMetricsIeltsSubscore1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------ | :----- | :------- | :---------- |
+| grammar | number | ❌ | |
+| vocab | number | ❌ | |
+
+# FluencySegmentMetricsList3
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------------- | :--------- | :------- | :---------- |
+| allPauseCount | number | ❌ | |
+| allPauseDuration | number | ❌ | |
+| allPauseList | number[][] | ❌ | |
+| articulationLength | number | ❌ | |
+| articulationRate | number | ❌ | |
+| correctSyllableCount | number | ❌ | |
+| correctWordCount | number | ❌ | |
+| duration | number | ❌ | |
+| ieltsEstimate | number | ❌ | |
+| maxLengthRun | number | ❌ | |
+| meanLengthRun | number | ❌ | |
+| pteEstimate | number | ❌ | |
+| segment | number[] | ❌ | |
+| speechRate | number | ❌ | |
+| syllableCorrectPerMinute | number | ❌ | |
+| syllableCount | number | ❌ | |
+| wordCorrectPerMinute | number | ❌ | |
+| wordCount | number | ❌ | |
+
+# WordIntonationList
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :--------------------- | :--------- | :------- | :---------- |
+| syllableIntonationList | string[][] | ❌ | |
+| word | string | ❌ | |
+
+# TextScoreWordScoreList2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---------------- | :-------------------------------- | :------- | :---------- |
+| phoneScoreList | WordScoreListPhoneScoreList3[] | ❌ | |
+| qualityScore | number | ❌ | |
+| syllableScoreList | WordScoreListSyllableScoreList3[] | ❌ | |
+| word | string | ❌ | |
+
+# WordScoreListPhoneScoreList3
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| phone | string | ❌ | |
+| qualityScore | number | ❌ | |
+| soundMostLike | string | ❌ | |
+| stressLevel | number | ❌ | |
+| stressScore | number | ❌ | |
+
+# WordScoreListSyllableScoreList3
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------- | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| letters | string | ❌ | |
+| phoneCount | number | ❌ | |
+| qualityScore | number | ❌ | |
+| stressLevel | number | ❌ | |
+| stressScore | number | ❌ | |
+
+
diff --git a/documentation/models/ScoreAWordOrSentence1Request.md b/documentation/models/ScoreAWordOrSentence1Request.md
new file mode 100644
index 0000000..dfa6c00
--- /dev/null
+++ b/documentation/models/ScoreAWordOrSentence1Request.md
@@ -0,0 +1,13 @@
+# ScoreAWordOrSentence1Request
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :---------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| includeFluency | string | ❌ | includes fluency scoring for this request. To use this field you must have a Speechace API PRO key. |
+| includeIeltsSubscore | string | ❌ | beta: include IELTS subscores for (Vocabulary, Grammar). |
+| questionInfo | string | ❌ | A unique identifier for the activity or question this user audio is answering. Structure this field to include as much info as possible to aid in reporting and analytics. For example: **question_info='u1/q1'** where: _ u1: means the question belongs to Unit 1 in your content _ q1: means this is question 1 within the unit You can add more levels as needed. Ensure **no personally identifiable information** is passed in this field. |
+| text | string | ❌ | One or more paragraphs of text to score. |
+| userAudioFile | ArrayBuffer | ❌ | file with user audio (wav, mp3, m4a, webm, ogg, aiff) |
+
+
diff --git a/documentation/models/ScoreAWordOrSentenceOkResponse.md b/documentation/models/ScoreAWordOrSentenceOkResponse.md
new file mode 100644
index 0000000..1f262b2
--- /dev/null
+++ b/documentation/models/ScoreAWordOrSentenceOkResponse.md
@@ -0,0 +1,185 @@
+# ScoreAWordOrSentenceOkResponse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :-------------------------------------- | :------- | :---------- |
+| quotaRemaining | number | ❌ | |
+| status | string | ❌ | |
+| textScore | ScoreAWordOrSentenceOkResponseTextScore | ❌ | |
+| version | string | ❌ | |
+
+# ScoreAWordOrSentenceOkResponseTextScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :------------------------ | :------- | :---------- |
+| cefrScore | TextScoreCefrScore | ❌ | |
+| fluency | TextScoreFluency1 | ❌ | |
+| ieltsScore | TextScoreIeltsScore | ❌ | |
+| pteScore | TextScorePteScore | ❌ | |
+| speechaceScore | TextScoreSpeechaceScore | ❌ | |
+| text | string | ❌ | |
+| toeicScore | TextScoreToeicScore | ❌ | |
+| wordScoreList | TextScoreWordScoreList1[] | ❌ | |
+
+# TextScoreCefrScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| fluency | string | ❌ | |
+| pronunciation | string | ❌ | |
+
+# TextScoreFluency1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------- | :--------------------------- | :------- | :---------- |
+| fluencyVersion | any | ❌ | |
+| overallMetrics | FluencyOverallMetrics1 | ❌ | |
+| segmentMetricsList | FluencySegmentMetricsList1[] | ❌ | |
+
+# FluencyOverallMetrics1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------------- | :--------- | :------- | :---------- |
+| allPauseCount | number | ❌ | |
+| allPauseDuration | number | ❌ | |
+| allPauseList | number[][] | ❌ | |
+| articulationLength | number | ❌ | |
+| articulationRate | number | ❌ | |
+| correctSyllableCount | number | ❌ | |
+| correctWordCount | number | ❌ | |
+| duration | number | ❌ | |
+| maxLengthRun | number | ❌ | |
+| meanLengthRun | number | ❌ | |
+| segment | number[] | ❌ | |
+| speechRate | number | ❌ | |
+| syllableCorrectPerMinute | number | ❌ | |
+| syllableCount | number | ❌ | |
+| wordCorrectPerMinute | number | ❌ | |
+| wordCount | number | ❌ | |
+
+# FluencySegmentMetricsList1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------------- | :-------------------------------- | :------- | :---------- |
+| allPauseCount | number | ❌ | |
+| allPauseDuration | number | ❌ | |
+| allPauseList | number[][] | ❌ | |
+| articulationLength | number | ❌ | |
+| articulationRate | number | ❌ | |
+| cefrScore | SegmentMetricsListCefrScore1 | ❌ | |
+| correctSyllableCount | number | ❌ | |
+| correctWordCount | number | ❌ | |
+| duration | number | ❌ | |
+| maxLengthRun | number | ❌ | |
+| meanLengthRun | number | ❌ | |
+| segment | number[] | ❌ | |
+| speechRate | number | ❌ | |
+| speechaceScore | SegmentMetricsListSpeechaceScore1 | ❌ | |
+| syllableCorrectPerMinute | number | ❌ | |
+| syllableCount | number | ❌ | |
+| wordCorrectPerMinute | number | ❌ | |
+| wordCount | number | ❌ | |
+
+# SegmentMetricsListCefrScore1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| fluency | string | ❌ | |
+| pronunciation | string | ❌ | |
+
+# SegmentMetricsListSpeechaceScore1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| fluency | number | ❌ | |
+| pronunciation | number | ❌ | |
+
+# TextScoreIeltsScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| pronunciation | number | ❌ | |
+
+# TextScorePteScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| pronunciation | number | ❌ | |
+
+# TextScoreSpeechaceScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| fluency | number | ❌ | |
+| pronunciation | number | ❌ | |
+
+# TextScoreToeicScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| pronunciation | number | ❌ | |
+
+# TextScoreWordScoreList1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---------------- | :-------------------------------- | :------- | :---------- |
+| phoneScoreList | WordScoreListPhoneScoreList1[] | ❌ | |
+| qualityScore | number | ❌ | |
+| syllableScoreList | WordScoreListSyllableScoreList1[] | ❌ | |
+| word | string | ❌ | |
+
+# WordScoreListPhoneScoreList1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| phone | string | ❌ | |
+| predictedStressLevel | number | ❌ | |
+| qualityScore | number | ❌ | |
+| soundMostLike | string | ❌ | |
+| stressLevel | number | ❌ | |
+| stressScore | number | ❌ | |
+| wordExtent | number[] | ❌ | |
+
+# WordScoreListSyllableScoreList1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| letters | string | ❌ | |
+| phoneCount | number | ❌ | |
+| predictedStressLevel | number | ❌ | |
+| qualityScore | number | ❌ | |
+| stressLevel | number | ❌ | |
+| stressScore | number | ❌ | |
+
+
diff --git a/documentation/models/ScoreAWordOrSentenceRequest.md b/documentation/models/ScoreAWordOrSentenceRequest.md
new file mode 100644
index 0000000..ddfe40f
--- /dev/null
+++ b/documentation/models/ScoreAWordOrSentenceRequest.md
@@ -0,0 +1,13 @@
+# ScoreAWordOrSentenceRequest
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------ | :---------- | :------- | :----------------------------------------------------------------------------------------------------------- |
+| includeFluency | string | ❌ | includes fluency scoring for this request. |
+| includeUnknownWords | string | ❌ | Instructs Speechace to automatically infer expected pronunciation for unknown terms such names, places, etc. |
+| noMc | string | ❌ | Indicates no multiple choice type text used. |
+| text | string | ❌ | One or more paragraphs of text to score. |
+| userAudioFile | ArrayBuffer | ❌ | file with user audio (wav, mp3, m4a, webm, ogg, aiff) |
+
+
diff --git a/documentation/models/ScoreTaskRequest.md b/documentation/models/ScoreTaskRequest.md
new file mode 100644
index 0000000..9826241
--- /dev/null
+++ b/documentation/models/ScoreTaskRequest.md
@@ -0,0 +1,11 @@
+# ScoreTaskRequest
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------- | :----- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| includeSpeechScore | string | ❌ | Default: 1 Whether to include scoring other aspects of the speech: Pronunciation, Fluency, Grammar, Vocab, Coherence. Set to 0 if you only want to receive the task score. |
+| taskQuestion | string | ❌ | The question presented to the user. |
+| userAudioText | string | ❌ | |
+
+
diff --git a/documentation/models/TranscribeScore1OkResponse.md b/documentation/models/TranscribeScore1OkResponse.md
new file mode 100644
index 0000000..411fe2e
--- /dev/null
+++ b/documentation/models/TranscribeScore1OkResponse.md
@@ -0,0 +1,156 @@
+# TranscribeScore1OkResponse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :------------------------------------ | :------- | :---------- |
+| quotaRemaining | number | ❌ | |
+| speechScore | TranscribeScore1OkResponseSpeechScore | ❌ | |
+| status | string | ❌ | |
+| version | string | ❌ | |
+
+# TranscribeScore1OkResponseSpeechScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :-------------------------- | :------- | :---------- |
+| fidelityClass | string | ❌ | |
+| fluency | SpeechScoreFluency2 | ❌ | |
+| qualityScore | number | ❌ | |
+| relevance | SpeechScoreRelevance2 | ❌ | |
+| transcript | string | ❌ | |
+| wordScoreList | SpeechScoreWordScoreList2[] | ❌ | |
+
+# SpeechScoreFluency2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :--------------------------- | :------- | :---------- |
+| fluencyVersion | any | ❌ | |
+| ieltsSubscoreVersion | any | ❌ | |
+| overallMetrics | FluencyOverallMetrics4 | ❌ | |
+| segmentMetricsList | FluencySegmentMetricsList4[] | ❌ | |
+
+# FluencyOverallMetrics4
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------------- | :--------------------------- | :------- | :---------- |
+| allPauseCount | number | ❌ | |
+| allPauseDuration | number | ❌ | |
+| allPauseList | number[][] | ❌ | |
+| articulationLength | number | ❌ | |
+| articulationRate | number | ❌ | |
+| correctSyllableCount | number | ❌ | |
+| correctWordCount | number | ❌ | |
+| duration | number | ❌ | |
+| fluencyScore | number | ❌ | |
+| ieltsEstimate | number | ❌ | |
+| ieltsSubscore | OverallMetricsIeltsSubscore2 | ❌ | |
+| maxLengthRun | number | ❌ | |
+| meanLengthRun | number | ❌ | |
+| pteEstimate | number | ❌ | |
+| segment | number[] | ❌ | |
+| speechRate | number | ❌ | |
+| syllableCorrectPerMinute | number | ❌ | |
+| syllableCount | number | ❌ | |
+| wordCorrectPerMinute | number | ❌ | |
+| wordCount | number | ❌ | |
+
+# OverallMetricsIeltsSubscore2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :-------- | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| grammar | number | ❌ | |
+| vocab | number | ❌ | |
+
+# FluencySegmentMetricsList4
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------------- | :------------------------------ | :------- | :---------- |
+| allPauseCount | number | ❌ | |
+| allPauseDuration | number | ❌ | |
+| allPauseList | number[][] | ❌ | |
+| articulationLength | number | ❌ | |
+| articulationRate | number | ❌ | |
+| correctSyllableCount | number | ❌ | |
+| correctWordCount | number | ❌ | |
+| duration | number | ❌ | |
+| fluencyScore | number | ❌ | |
+| ieltsEstimate | number | ❌ | |
+| ieltsSubscore | SegmentMetricsListIeltsSubscore | ❌ | |
+| maxLengthRun | number | ❌ | |
+| meanLengthRun | number | ❌ | |
+| pteEstimate | number | ❌ | |
+| segment | number[] | ❌ | |
+| speechRate | number | ❌ | |
+| syllableCorrectPerMinute | number | ❌ | |
+| syllableCount | number | ❌ | |
+| wordCorrectPerMinute | number | ❌ | |
+| wordCount | number | ❌ | |
+
+# SegmentMetricsListIeltsSubscore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :-------- | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| grammar | number | ❌ | |
+| vocab | number | ❌ | |
+
+# SpeechScoreRelevance2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| class | string | ❌ | |
+
+# SpeechScoreWordScoreList2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---------------- | :-------------------------------- | :------- | :---------- |
+| endingPunctuation | string | ❌ | |
+| phoneScoreList | WordScoreListPhoneScoreList4[] | ❌ | |
+| qualityScore | number | ❌ | |
+| syllableScoreList | WordScoreListSyllableScoreList4[] | ❌ | |
+| word | string | ❌ | |
+
+# WordScoreListPhoneScoreList4
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| phone | string | ❌ | |
+| qualityScore | number | ❌ | |
+| soundMostLike | string | ❌ | |
+| stressLevel | number | ❌ | |
+| stressScore | number | ❌ | |
+
+# WordScoreListSyllableScoreList4
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------- | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| letters | string | ❌ | |
+| phoneCount | number | ❌ | |
+| qualityScore | number | ❌ | |
+| stressLevel | number | ❌ | |
+| stressScore | number | ❌ | |
+
+
diff --git a/documentation/models/TranscribeScore1Request.md b/documentation/models/TranscribeScore1Request.md
new file mode 100644
index 0000000..152b3d2
--- /dev/null
+++ b/documentation/models/TranscribeScore1Request.md
@@ -0,0 +1,13 @@
+# TranscribeScore1Request
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :---------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| includeFluency | string | ❌ | includes fluency scoring for this request. To use this field you must have a Speechace API PRO key. |
+| includeIeltsSubscore | string | ❌ | include IELTS subscores for (Vocabulary, Grammar, Coherence). |
+| includeUnknownWords | string | ❌ | automatically identify the phonetic mapping for any unknown words such as names or locations and use that for scoring. |
+| relevanceContext | string | ❌ | Question Prompt text provided to the user. When this parameter is passed, the relevance of the user audio transcript is evaluated for the given question prompt and a resulting relevance class is returned in .speech_score.relevance.class (TRUE/FALSE). A FALSE relevance class will result in .speech_score.fluency.overall_metrics.ielts_estimate and .speech_score.fluency.overall_metrics.pte_estimate to be set to the lowest possible score. |
+| userAudioFile | ArrayBuffer | ❌ | file with user audio (wav, mp3, m4a, webm, ogg, aiff) |
+
+
diff --git a/documentation/models/TranscribeScoreOkResponse.md b/documentation/models/TranscribeScoreOkResponse.md
new file mode 100644
index 0000000..fc4d6a7
--- /dev/null
+++ b/documentation/models/TranscribeScoreOkResponse.md
@@ -0,0 +1,555 @@
+# TranscribeScoreOkResponse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :----------------------------------- | :------- | :---------- |
+| quotaRemaining | number | ❌ | |
+| speechScore | TranscribeScoreOkResponseSpeechScore | ❌ | |
+| status | string | ❌ | |
+| version | string | ❌ | |
+
+# TranscribeScoreOkResponseSpeechScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :-------------------------- | :------- | :---------- |
+| asrVersion | string | ❌ | |
+| cefrScore | SpeechScoreCefrScore | ❌ | |
+| coherence | Coherence | ❌ | |
+| fluency | SpeechScoreFluency1 | ❌ | |
+| grammar | Grammar | ❌ | |
+| ieltsScore | SpeechScoreIeltsScore | ❌ | |
+| pteScore | SpeechScorePteScore | ❌ | |
+| relevance | SpeechScoreRelevance1 | ❌ | |
+| scoreIssueList | ScoreIssueList[] | ❌ | |
+| speechaceScore | SpeechScoreSpeechaceScore | ❌ | |
+| toeicScore | SpeechScoreToeicScore | ❌ | |
+| transcript | string | ❌ | |
+| vocab | Vocab | ❌ | |
+| wordScoreList | SpeechScoreWordScoreList1[] | ❌ | |
+
+# SpeechScoreCefrScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | string | ❌ | |
+| fluency | string | ❌ | |
+| grammar | string | ❌ | |
+| overall | string | ❌ | |
+| pronunciation | string | ❌ | |
+| vocab | string | ❌ | |
+
+# Coherence
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :---------------------- | :------- | :---------- |
+| overallMetrics | CoherenceOverallMetrics | ❌ | |
+
+# CoherenceOverallMetrics
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------ | :------------------ | :------- | :---------- |
+| adverbDiversity | AdverbDiversity | ❌ | |
+| basicConnectives | BasicConnectives | ❌ | |
+| causalConnectives | CausalConnectives | ❌ | |
+| lexicalDensity | LexicalDensity | ❌ | |
+| negativeConnectives | NegativeConnectives | ❌ | |
+| pronounDensity | PronounDensity | ❌ | |
+| verbDiversity | VerbDiversity | ❌ | |
+
+# AdverbDiversity
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# BasicConnectives
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------- | :------- | :------- | :---------- |
+| examples | string[] | ❌ | |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# CausalConnectives
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# LexicalDensity
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# NegativeConnectives
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------- | :------- | :------- | :---------- |
+| examples | string[] | ❌ | |
+| level | string | ❌ | |
+| message | string | ❌ | |
+| score | number | ❌ | |
+
+# PronounDensity
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# VerbDiversity
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# SpeechScoreFluency1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :--------------------------- | :------- | :---------- |
+| fluencyVersion | string | ❌ | |
+| ieltsSubscoreVersion | string | ❌ | |
+| overallMetrics | FluencyOverallMetrics2 | ❌ | |
+| segmentMetricsList | FluencySegmentMetricsList2[] | ❌ | |
+
+# FluencyOverallMetrics2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------------- | :--------- | :------- | :---------- |
+| allPauseCount | number | ❌ | |
+| allPauseDuration | number | ❌ | |
+| allPauseList | number[][] | ❌ | |
+| articulationLength | number | ❌ | |
+| articulationRate | number | ❌ | |
+| correctSyllableCount | number | ❌ | |
+| correctWordCount | number | ❌ | |
+| duration | number | ❌ | |
+| fluencyScore | number | ❌ | |
+| maxLengthRun | number | ❌ | |
+| meanLengthRun | number | ❌ | |
+| segment | number[] | ❌ | |
+| speechRate | number | ❌ | |
+| syllableCorrectPerMinute | number | ❌ | |
+| syllableCount | number | ❌ | |
+| wordCorrectPerMinute | number | ❌ | |
+| wordCount | number | ❌ | |
+
+# FluencySegmentMetricsList2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------------------- | :-------------------------------- | :------- | :---------- |
+| allPauseCount | number | ❌ | |
+| allPauseDuration | number | ❌ | |
+| allPauseList | number[][] | ❌ | |
+| articulationLength | number | ❌ | |
+| articulationRate | number | ❌ | |
+| cefrScore | SegmentMetricsListCefrScore2 | ❌ | |
+| correctSyllableCount | number | ❌ | |
+| correctWordCount | number | ❌ | |
+| duration | number | ❌ | |
+| ieltsScore | SegmentMetricsListIeltsScore | ❌ | |
+| maxLengthRun | number | ❌ | |
+| meanLengthRun | number | ❌ | |
+| pteScore | SegmentMetricsListPteScore | ❌ | |
+| segment | number[] | ❌ | |
+| speechRate | number | ❌ | |
+| speechaceScore | SegmentMetricsListSpeechaceScore2 | ❌ | |
+| syllableCorrectPerMinute | number | ❌ | |
+| syllableCount | number | ❌ | |
+| toeicScore | SegmentMetricsListToeicScore | ❌ | |
+| wordCorrectPerMinute | number | ❌ | |
+| wordCount | number | ❌ | |
+
+# SegmentMetricsListCefrScore2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | string | ❌ | |
+| fluency | string | ❌ | |
+| grammar | string | ❌ | |
+| pronunciation | string | ❌ | |
+| vocab | string | ❌ | |
+
+# SegmentMetricsListIeltsScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| fluency | number | ❌ | |
+| grammar | number | ❌ | |
+| pronunciation | number | ❌ | |
+| vocab | number | ❌ | |
+
+# SegmentMetricsListPteScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| fluency | number | ❌ | |
+| grammar | number | ❌ | |
+| pronunciation | number | ❌ | |
+| vocab | number | ❌ | |
+
+# SegmentMetricsListSpeechaceScore2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| fluency | number | ❌ | |
+| grammar | number | ❌ | |
+| pronunciation | number | ❌ | |
+| vocab | number | ❌ | |
+
+# SegmentMetricsListToeicScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| fluency | number | ❌ | |
+| grammar | number | ❌ | |
+| pronunciation | number | ❌ | |
+| vocab | number | ❌ | |
+
+# Grammar
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :-------------------- | :------- | :---------- |
+| errors | Errors[] | ❌ | |
+| overallMetrics | GrammarOverallMetrics | ❌ | |
+
+# Errors
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :----------- | :------- | :------- | :---------- |
+| category | string | ❌ | |
+| matchedText | string | ❌ | |
+| message | string | ❌ | |
+| replacements | string[] | ❌ | |
+| span | number[] | ❌ | |
+
+# GrammarOverallMetrics
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------ | :------------------------------ | :------- | :---------- |
+| grammaticalAccuracy | GrammaticalAccuracy | ❌ | |
+| grammaticalRange | GrammaticalRange | ❌ | |
+| length | Length | ❌ | |
+| lexicalDiversity | OverallMetricsLexicalDiversity1 | ❌ | |
+
+# GrammaticalAccuracy
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# GrammaticalRange
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------------ | :------------------------ | :------- | :---------- |
+| adverbModifierVariation | AdverbModifierVariation | ❌ | |
+| level | string | ❌ | |
+| message | string | ❌ | |
+| nounPhraseComplexity | NounPhraseComplexity | ❌ | |
+| nounPhraseVariation | NounPhraseVariation | ❌ | |
+| score | number | ❌ | |
+| verbConstructionVariation | VerbConstructionVariation | ❌ | |
+
+# AdverbModifierVariation
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# NounPhraseComplexity
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------ | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| message | string | ❌ | |
+| score | number | ❌ | |
+
+# NounPhraseVariation
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# VerbConstructionVariation
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# Length
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# OverallMetricsLexicalDiversity1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# SpeechScoreIeltsScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| fluency | number | ❌ | |
+| grammar | number | ❌ | |
+| overall | number | ❌ | |
+| pronunciation | number | ❌ | |
+| vocab | number | ❌ | |
+
+# SpeechScorePteScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| fluency | number | ❌ | |
+| grammar | number | ❌ | |
+| overall | number | ❌ | |
+| pronunciation | number | ❌ | |
+| vocab | number | ❌ | |
+
+# SpeechScoreRelevance1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| class | string | ❌ | |
+
+# ScoreIssueList
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| detailMessage | string | ❌ | |
+| shortMessage | string | ❌ | |
+| source | string | ❌ | |
+| status | string | ❌ | |
+
+# SpeechScoreSpeechaceScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| fluency | number | ❌ | |
+| grammar | number | ❌ | |
+| overall | number | ❌ | |
+| pronunciation | number | ❌ | |
+| vocab | number | ❌ | |
+
+# SpeechScoreToeicScore
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| coherence | number | ❌ | |
+| fluency | number | ❌ | |
+| grammar | number | ❌ | |
+| overall | number | ❌ | |
+| pronunciation | number | ❌ | |
+| vocab | number | ❌ | |
+
+# Vocab
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :------------------ | :------- | :---------- |
+| overallMetrics | VocabOverallMetrics | ❌ | |
+
+# VocabOverallMetrics
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :--------------------- | :------------------------------ | :------- | :---------- |
+| academicLanguageUse | AcademicLanguageUse | ❌ | |
+| collocationCommonality | CollocationCommonality | ❌ | |
+| idiomaticity | Idiomaticity | ❌ | |
+| lexicalDiversity | OverallMetricsLexicalDiversity2 | ❌ | |
+| wordSophistication | WordSophistication | ❌ | |
+| wordSpecificity | WordSpecificity | ❌ | |
+
+# AcademicLanguageUse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------ | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| message | string | ❌ | |
+| score | number | ❌ | |
+
+# CollocationCommonality
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# Idiomaticity
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# OverallMetricsLexicalDiversity2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# WordSophistication
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---- | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| score | number | ❌ | |
+
+# WordSpecificity
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------ | :----- | :------- | :---------- |
+| level | string | ❌ | |
+| message | string | ❌ | |
+| score | number | ❌ | |
+
+# SpeechScoreWordScoreList1
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :---------------- | :-------------------------------- | :------- | :---------- |
+| endingPunctuation | string | ❌ | |
+| phoneScoreList | WordScoreListPhoneScoreList2[] | ❌ | |
+| qualityScore | number | ❌ | |
+| syllableScoreList | WordScoreListSyllableScoreList2[] | ❌ | |
+| word | string | ❌ | |
+
+# WordScoreListPhoneScoreList2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| phone | string | ❌ | |
+| predictedStressLevel | number | ❌ | |
+| qualityScore | number | ❌ | |
+| soundMostLike | string | ❌ | |
+| stressLevel | number | ❌ | |
+| stressScore | number | ❌ | |
+
+# WordScoreListSyllableScoreList2
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :------- | :------- | :---------- |
+| extent | number[] | ❌ | |
+| letters | string | ❌ | |
+| phoneCount | number | ❌ | |
+| predictedStressLevel | number | ❌ | |
+| qualityScore | number | ❌ | |
+| stressLevel | number | ❌ | |
+| stressScore | number | ❌ | |
+
+
diff --git a/documentation/models/TranscribeScoreRequest.md b/documentation/models/TranscribeScoreRequest.md
new file mode 100644
index 0000000..55ddf5f
--- /dev/null
+++ b/documentation/models/TranscribeScoreRequest.md
@@ -0,0 +1,11 @@
+# TranscribeScoreRequest
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------------- | :---------- | :------- | :----------------------------------------------------------------------------- |
+| includeIeltsFeedback | string | ❌ | include feedback metrics for Grammar, Vocab, Coherence. |
+| questionInfo | string | ❌ | A unique identifier for the activity or question this user audio is answering. |
+| userAudioFile | ArrayBuffer | ❌ | file with user audio (wav, mp3, m4a, webm, ogg, aiff) |
+
+
diff --git a/documentation/models/ValidateText1OkResponse.md b/documentation/models/ValidateText1OkResponse.md
new file mode 100644
index 0000000..98ed435
--- /dev/null
+++ b/documentation/models/ValidateText1OkResponse.md
@@ -0,0 +1,11 @@
+# ValidateText1OkResponse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------ | :----- | :------- | :---------- |
+| detailMessage | string | ❌ | |
+| shortMessage | string | ❌ | |
+| status | string | ❌ | |
+
+
diff --git a/documentation/models/ValidateTextOkResponse.md b/documentation/models/ValidateTextOkResponse.md
new file mode 100644
index 0000000..5b316a5
--- /dev/null
+++ b/documentation/models/ValidateTextOkResponse.md
@@ -0,0 +1,12 @@
+# ValidateTextOkResponse
+
+**Properties**
+
+| Name | Type | Required | Description |
+| :------------- | :----- | :------- | :---------- |
+| detailMessage | string | ❌ | |
+| quotaRemaining | number | ❌ | |
+| shortMessage | string | ❌ | |
+| status | string | ❌ | |
+
+
diff --git a/documentation/services/V1V7OlderVersions_Service.md b/documentation/services/V1V7OlderVersions_Service.md
new file mode 100644
index 0000000..15968e7
--- /dev/null
+++ b/documentation/services/V1V7OlderVersions_Service.md
@@ -0,0 +1,195 @@
+# V1V7OlderVersions_Service
+
+A list of all methods in the `V1V7OlderVersions_Service` service. Click on the method name to view detailed information about that method.
+
+| Methods | Description |
+| :---------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [scoreAWordOrSentence1](#scoreawordorsentence1) | **In this example we score pronunciation of a word or sentence** Scoring pronunciation provides a quality score for the speaker's pronunciation for the entire utterance and for each word, syllable, phoneme. This allows overall activity scoring and pin-pointed feedback on pronunciation mistakes. In this request JSON result includes the following fields: Field \| Description :------:\|:-----: quality_score \| An overall pronunciation score for the the entire utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric. syllable_score_list[] \| a list of syllables in each word in the word_score_list[], each with it's own quality_score word_score_list[] \| a list of words in the utterance, each with it's own quality_score syllable_score_list[] \| a list of syllables in each word in the word_score_list[], each with it's own quality_score phone_score_list[] \| a list of phonemes in each word in the word_score_list[], each with it's own quality_score extent[] \| start and end boundaries of a syllable or phoneme in units of 10 msec. |
+| [scoreAPhonemeList1](#scoreaphonemelist1) | **In this example we score the term:** "gotcha" /g/ao1/ch/ah0 Since **gotcha** is an american vernacular and not a valid dictionary word we use the phoneme list API to score it. The phoneme list uses a different url endpoint and expects the list of phonemes in [Arpabet notation](https://en.wikipedia.org/wiki/Arpabet). Note that we specify phoneme stress as 0,1,2 per Arpabet notation. This API allows you to score any word or sentence that can phonetically expressed in Arpabet. **Copy the example code and be sure to:** 1. Add your Speechace API key 2. Add a valid file path in the **user_audio_file** parameter. _For example in curl the you would add something like @/tmp/gotcha_16k.wav_ You can download a sample _gotcha_16k.wav_ file [here](https://s3-us-west-2.amazonaws.com/speechace-public/sample-audio/gotcha_16k.wav). |
+| [validateText1](#validatetext1) | In this example we validate whether all the words in the text exist in the Speechace lexicon. This API allows you to quickly check whether authored content will be able to be scored with Speechace. This is useful to use at the time of text authoring to avoid errors later on. Out of lexicon terms can be reported to support@speechace.com for inclusion. Or you can see the phoneme list API as an alternative. **Copy the example code and be sure to:** 1. Add your Speechace API key 2. Replace text with the text you wish to validate. 3. Set the dialect parameter to the dialect you will use when scoring. If you are not sure which dialect will be used then validate once using each available dialect. |
+| [transcribeScore1](#transcribescore1) | **In this example we transcribe a free speaking audio and score the response providing an estimated IELTS score for each of the following aspects:** _ Fluency _ Pronunciation _ Grammar _ Vocabulary \* Coherence The API accepts the user audio and a relevance context as inputs. The relevance context is typically a question prompt provided to the user. The relevance context is used to provide a relevance assessment of whether the users response is relevant or not. Irrelevant answers have the overall IELTS score automatically set to zero. In this request JSON result includes the following fields: \| Field \| Description \| \| --- \| --- \| \| transcript \| The speech-to-text transcript of what the user has said. \| \| relevance.class \| Boolean. Whether the user response is relevant to the relevance context passed to the API. \| \| ielts_estimate \| an estimate of the IELTS Speaking Fluency of the speaker \| \| ielts_subscore.vocab \| an estimate of the IELTS Vocabulary level of the speaker's response \| \| ielts_subscore.grammar \| an estimate of the IELTS Grammar level of the speaker's response \| \| ielts_subscore.coherence \| an estimate of the IELTS Coherence level of the speaker's response \| \| quality_score \| An overall pronunciation score for the the utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric. \| \| duration \| total length of speech in seconds \| \| articulation \| total length of articulation (speech minus pauses, hesitations and non-speech events such as laughter). Excludes beginning silence on very first segment and ending silence on very last segment. \| \| speech_rate \| speaking rate in syllables per second. \| \| articulation_rate \| articulation rate in syllables per second. \| \| syllable_count \| Count of syllables in this segmtent \| \| word_count \| Count of words in this segment \| \| correct_syllable_count \| Count of correctly spoken syllables in this segment \| \| correct_word_count \| Count of correctly spoken words in this segment \| \| syllable_correct_per_minute \| correct_syllable_count / duration in mins \| \| word_correct_per_minute \| correct_word_count / duration in mins \| \| all_pause_count \| count of all pauses (filled and unfilled) which are longer than the minimum pause threshold \| \| all_pause_duration \| total duration of all pauses (filled and unfilled) in seconds \| \| all_pause_list\[\] \| a list of all the pauses with the begin/end markers for each in extents of 10 msecs \| \| mean_length_run \| mean length of run in syllables between pauses \| \| max_length_run \| max length of run in syllables between pauses \| \| segment_metrics_list\[\] \| A list of segments within the overall text/audio with the IELTS scores, subscrores, and fluency metrics for each segment. \| \| syllable_score_list\[\] \| a list of syllables in each word in the word_score_list\[\], each with it's own quality_score \| \| word_score_list\[\] \| a list of words in the utterance, each with it's own quality_score \| \| syllable_score_list\[\] \| a list of syllables in each word in the word_score_list\[\], each with it's own quality_score \| \| phone_score_list\[\] \| a list of phonemes in each word in the word_score_list\[\], each with it's own quality_score \| \| extent\[\] \| start and end boundaries of a syllable or phoneme in units of 10 msec. \| |
+
+## scoreAWordOrSentence1
+
+**In this example we score pronunciation of a word or sentence** Scoring pronunciation provides a quality score for the speaker's pronunciation for the entire utterance and for each word, syllable, phoneme. This allows overall activity scoring and pin-pointed feedback on pronunciation mistakes. In this request JSON result includes the following fields: Field \| Description :------:\|:-----: quality_score \| An overall pronunciation score for the the entire utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric. syllable_score_list[] \| a list of syllables in each word in the word_score_list[], each with it's own quality_score word_score_list[] \| a list of words in the utterance, each with it's own quality_score syllable_score_list[] \| a list of syllables in each word in the word_score_list[], each with it's own quality_score phone_score_list[] \| a list of phonemes in each word in the word_score_list[], each with it's own quality_score extent[] \| start and end boundaries of a syllable or phoneme in units of 10 msec.
+
+- HTTP Method: `POST`
+- Endpoint: `/api/scoring/text/v0.5/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------ | :------------------------------------------------------------------------ | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| body | [ScoreAWordOrSentence1Request](../models/ScoreAWordOrSentence1Request.md) | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace. |
+| dialect | string | ❌ | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). en-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?` |
+| userId | string | ❌ | A unique anonymized identifier for the end-user who spoke the audio. Structure this field to include as much info as possible to aid in reporting and analytics. For example: **user_id=XYZ-ABC-99001** where: _ XYZ is an id for your Product or App _ ABC is an id for the customer/site/account \* 99001 is an id for the end-user Ensure user_id is unique and anonymized containing **no personally identifiable information**. |
+| \_\_ | string | ❌ | |
+
+**Return Type**
+
+`ScoreAWordOrSentence1OkResponse`
+
+**Example Usage Code Snippet**
+
+```typescript
+import { ScoreAWordOrSentence1Request, Speechaceapi } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+
+const input: ScoreAWordOrSentence1Request = {
+ includeFluency: "1",
+ includeIeltsSubscore: "1",
+ questionInfo: "'u1/q1'",
+ text: "Yes, I do. Travel today is vastly different than what it used to be. In the past, a traveller had little idea about what to expect when they arrived at their destination. These days, the internet connects our world in ways previous generations could only dream about. We can instantly review destination information and make travel arrangements. Also, in the past, people could only travel by land or sea and travelling was often long and unsafe.
+",
+ userAudioFile: user_audio_file
+};
+
+ const { data } = await speechaceapi.v1V7OlderVersions_.scoreAWordOrSentence1(
+ input,
+ {
+ key: "{{speechacekey}}",
+ dialect: "en-us",
+ userId: "XYZ-ABC-99001",
+ __: "anim cill",
+ }
+);
+
+ console.log(data);
+})();
+```
+
+## scoreAPhonemeList1
+
+**In this example we score the term:** "gotcha" /g/ao1/ch/ah0 Since **gotcha** is an american vernacular and not a valid dictionary word we use the phoneme list API to score it. The phoneme list uses a different url endpoint and expects the list of phonemes in [Arpabet notation](https://en.wikipedia.org/wiki/Arpabet). Note that we specify phoneme stress as 0,1,2 per Arpabet notation. This API allows you to score any word or sentence that can phonetically expressed in Arpabet. **Copy the example code and be sure to:** 1. Add your Speechace API key 2. Add a valid file path in the **user_audio_file** parameter. _For example in curl the you would add something like @/tmp/gotcha_16k.wav_ You can download a sample _gotcha_16k.wav_ file [here](https://s3-us-west-2.amazonaws.com/speechace-public/sample-audio/gotcha_16k.wav).
+
+- HTTP Method: `POST`
+- Endpoint: `/api/scoring/phone_list/v0.5/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------ | :------------------------------------------------------------------ | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| body | [ScoreAPhonemeList1Request](../models/ScoreAPhonemeList1Request.md) | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace. |
+| userId | string | ❌ | A unique anonymized identifier for the end-user who spoke the audio. Structure this field to include as much info as possible to aid in reporting and analytics. For example: **user_id=XYZ-ABC-99001** where: _ XYZ is an id for your Product or App _ ABC is an id for the customer/site/account \* 99001 is an id for the end-user Ensure user_id is unique and anonymized containing **no personally identifiable information**. |
+| dialect | string | ❌ | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). en-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?` |
+
+**Return Type**
+
+`ScoreAPhonemeList1OkResponse`
+
+**Example Usage Code Snippet**
+
+```typescript
+import { ScoreAPhonemeList1Request, Speechaceapi } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input: ScoreAPhonemeList1Request = {
+ phoneList: 'g|ao|ch|ah',
+ questionInfo: "'u1/q1'",
+ userAudioFile: user_audio_file,
+ };
+
+ const { data } = await speechaceapi.v1V7OlderVersions_.scoreAPhonemeList1(input, {
+ key: '{{speechacekey}}',
+ userId: 'XYZ-ABC-99001',
+ dialect: 'en-us',
+ });
+
+ console.log(data);
+})();
+```
+
+## validateText1
+
+In this example we validate whether all the words in the text exist in the Speechace lexicon. This API allows you to quickly check whether authored content will be able to be scored with Speechace. This is useful to use at the time of text authoring to avoid errors later on. Out of lexicon terms can be reported to support@speechace.com for inclusion. Or you can see the phoneme list API as an alternative. **Copy the example code and be sure to:** 1. Add your Speechace API key 2. Replace text with the text you wish to validate. 3. Set the dialect parameter to the dialect you will use when scoring. If you are not sure which dialect will be used then validate once using each available dialect.
+
+- HTTP Method: `POST`
+- Endpoint: `/api/validating/text/v0.5/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------ | :----- | :------- | :------------------------------------------------------------------------------------------------------------------------- |
+| body | any | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace. |
+| text | string | ❌ | A sentence or sequence of words to validate. |
+| dialect | string | ❌ | The dialect to use for validation. Default is "en-us". Supported values are "en-us" (US English) and "en-gb" (UK English). |
+
+**Return Type**
+
+`ValidateText1OkResponse`
+
+**Example Usage Code Snippet**
+
+```typescript
+import { Speechaceapi } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input = {};
+
+ const { data } = await speechaceapi.v1V7OlderVersions_.validateText1(input, {
+ key: '{{speechacekey}}',
+ text: '"Validate these words existeee."',
+ dialect: 'en-us',
+ });
+
+ console.log(data);
+})();
+```
+
+## transcribeScore1
+
+**In this example we transcribe a free speaking audio and score the response providing an estimated IELTS score for each of the following aspects:** _ Fluency _ Pronunciation _ Grammar _ Vocabulary \* Coherence The API accepts the user audio and a relevance context as inputs. The relevance context is typically a question prompt provided to the user. The relevance context is used to provide a relevance assessment of whether the users response is relevant or not. Irrelevant answers have the overall IELTS score automatically set to zero. In this request JSON result includes the following fields: \| Field \| Description \| \| --- \| --- \| \| transcript \| The speech-to-text transcript of what the user has said. \| \| relevance.class \| Boolean. Whether the user response is relevant to the relevance context passed to the API. \| \| ielts_estimate \| an estimate of the IELTS Speaking Fluency of the speaker \| \| ielts_subscore.vocab \| an estimate of the IELTS Vocabulary level of the speaker's response \| \| ielts_subscore.grammar \| an estimate of the IELTS Grammar level of the speaker's response \| \| ielts_subscore.coherence \| an estimate of the IELTS Coherence level of the speaker's response \| \| quality_score \| An overall pronunciation score for the the utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric. \| \| duration \| total length of speech in seconds \| \| articulation \| total length of articulation (speech minus pauses, hesitations and non-speech events such as laughter). Excludes beginning silence on very first segment and ending silence on very last segment. \| \| speech_rate \| speaking rate in syllables per second. \| \| articulation_rate \| articulation rate in syllables per second. \| \| syllable_count \| Count of syllables in this segmtent \| \| word_count \| Count of words in this segment \| \| correct_syllable_count \| Count of correctly spoken syllables in this segment \| \| correct_word_count \| Count of correctly spoken words in this segment \| \| syllable_correct_per_minute \| correct_syllable_count / duration in mins \| \| word_correct_per_minute \| correct_word_count / duration in mins \| \| all_pause_count \| count of all pauses (filled and unfilled) which are longer than the minimum pause threshold \| \| all_pause_duration \| total duration of all pauses (filled and unfilled) in seconds \| \| all_pause_list\[\] \| a list of all the pauses with the begin/end markers for each in extents of 10 msecs \| \| mean_length_run \| mean length of run in syllables between pauses \| \| max_length_run \| max length of run in syllables between pauses \| \| segment_metrics_list\[\] \| A list of segments within the overall text/audio with the IELTS scores, subscrores, and fluency metrics for each segment. \| \| syllable_score_list\[\] \| a list of syllables in each word in the word_score_list\[\], each with it's own quality_score \| \| word_score_list\[\] \| a list of words in the utterance, each with it's own quality_score \| \| syllable_score_list\[\] \| a list of syllables in each word in the word_score_list\[\], each with it's own quality_score \| \| phone_score_list\[\] \| a list of phonemes in each word in the word_score_list\[\], each with it's own quality_score \| \| extent\[\] \| start and end boundaries of a syllable or phoneme in units of 10 msec. \|
+
+- HTTP Method: `POST`
+- Endpoint: `/api/scoring/speech/v0.5/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------ | :-------------------------------------------------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| body | [TranscribeScore1Request](../models/TranscribeScore1Request.md) | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace. |
+| dialect | string | ❌ | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
+| userId | string | ❌ | A unique anonymized identifier for the end-user who spoke the audio. Structure this field to include as much info as possible to aid in reporting and analytics. For example: **user_id=XYZ-ABC-99001** where: _ XYZ is an id for your Product or App _ ABC is an id for the customer/site/account \* 99001 is an id for the end-user Ensure user_id is unique and anonymized containing **no personally identifiable information**. |
+
+**Return Type**
+
+`TranscribeScore1OkResponse`
+
+**Example Usage Code Snippet**
+
+```typescript
+import { Speechaceapi, TranscribeScore1Request } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input: TranscribeScore1Request = {
+ includeFluency: '1',
+ includeIeltsSubscore: '1',
+ includeUnknownWords: '1',
+ relevanceContext: 'Describe the healthy streets program and its impact on the residents of Austin Texas.',
+ userAudioFile: user_audio_file,
+ };
+
+ const { data } = await speechaceapi.v1V7OlderVersions_.transcribeScore1(input, {
+ key: '{{speechace_premiumkey}}',
+ dialect: 'en-us',
+ userId: 'XYZ-ABC-99001',
+ });
+
+ console.log(data);
+})();
+```
+
+
diff --git a/documentation/services/V9Latest_Service.md b/documentation/services/V9Latest_Service.md
new file mode 100644
index 0000000..d94a5bb
--- /dev/null
+++ b/documentation/services/V9Latest_Service.md
@@ -0,0 +1,230 @@
+# V9Latest_Service
+
+A list of all methods in the `V9Latest_Service` service. Click on the method name to view detailed information about that method.
+
+| Methods | Description |
+| :-------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [scoreAWordOrSentence](#scoreawordorsentence) | **In this example we score pronunciation of a word or sentence** The overall score is returned as a `speechace_score` on a scale of 0 to 100. In addition, the API returns a `quality_score` on a scale of 0 to 100 for each word, syllable, and phoneme in the utterance which allows pin-pointed feedback on pronunciation mistakes made by the speaker. ### Overall Score The API result contains the following score field under the `text_score` node: \| **Field** \| **Description** \| \| --- \| --- \| \| speecahce_score.pronunciation \| An overall pronunciation score for the the entire utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric. \| ### **Feedback Subscores** In addition the API returns the following lists of elements and subscores. \| Field \| Description \| \| --- \| --- \| \| word_score_list\[\] \| a list of words in the utterance, each with it's own quality_score \| \| syllable_score_list\[\] \| a list of syllables in each word in the word_score_list\[\], each with it's own quality_score \| \| phone_score_list\[\] \| a list of phonemes in each word in the word_score_list\[\], each with it's own quality_score \| Each element has its own `quality_score` (see [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116)), its `extent` information marking its begin and end in time (see [guide](https://docs.speechace.com/#84c3936d-d51f-464e-8157-9ffc701ade96)) and additional fields. For example each element in `phone_score_list[]` identifies the expected `phone` in [Arpabet phonetic notation](https://docs.speechace.com/#bbde2f96-dedf-41f9-803d-b40801a969bb) and the actual `sound_most_like` phone based on the speaker's attempt. It also includes the `word_extent` for that phone to enable [mapping to its corresponding letters](https://docs.speechace.com/#3381d375-76bd-4a3a-bcd0-af029e752484) in the word. This enables Applications to visually demonstrate pronunciation errors to the speaker. `json "word_score_list":[ { "word": "Some", "quality_score": 100, "phone_score_list": [ { "phone": "s", "stress_level": null, "extent": [10,27], "quality_score": 99.05882352941177, "sound_most_like": "s" }, { "phone": "ah", "stress_level": 1, "extent": [27,36], "quality_score": 100, "stress_score": 100, "sound_most_like": "ah" }, ... } ] ` |
+| [scoreAPhonemeList](#scoreaphonemelist) | **In this example we score the term:** "gotcha" /g/ao1/ch/ah0 Since **gotcha** is an american vernacular and not a valid dictionary word we use the phoneme list API to score it. The phoneme list uses a different url endpoint and expects the list of phonemes in [Arpabet notation](https://en.wikipedia.org/wiki/Arpabet). Note that we specify phoneme stress as 0,1,2 per Arpabet notation. This API allows you to score any word or sentence that can phonetically expressed in Arpabet. |
+| [validateText](#validatetext) | In this example we validate whether all the words in the text exist in the Speechace lexicon. This API allows you to quickly check whether authored content will be able to be scored with Speechace. This is useful to use at the time of text authoring to avoid errors later on. Out of lexicon terms can be reported to [support@speechace.com](mailto:support@speechace.com) for inclusion. Or you can see the phoneme list API as an alternative. You may also opt let Speechace API [automatically handle unknown words](https://docs.speechace.com/#2f59fc09-d3ef-410c-b9e8-ee91dddc0eec) by finding the most likely phonetic mapping for the term. |
+| [scoreTask](#scoretask) | This section contains a full description of the Score Task request type. In the subsequent sections you can find specific request examples for the following task types: - describe-image - retell-lecture - answer-question |
+| [transcribeScore](#transcribescore) | **In this example we transcribe a free speaking audio and score the response providing an estimated IELTS and CEFR score for each of the following aspects:** - Fluency - Pronunciation - Grammar - Vocabulary - Coherence The API accepts the user audio and a `relevance_context` as inputs. The `relevance_context` is typically a question prompt provided to the user and is used to provide a relevance assessment of whether the user's response is relevant or not. Irrelevant answers have the overall IELTS score automatically set to zero and a warning is returned in the `score_issue_list[]` in the API result. ### Overall Scores The overall score is returned in 5 formats. See the [Scoring Rubrics Guide](https://docs.speechace.com/#1a63edfe-1c4d-4c49-a694-95ee9638ebbe) to understand how the different formats map to each other: - A `speechace_score` on a scale of 0 to 100 - An `ielts_score` on a standard IELTS scale of 0 to 9.0 - A `pte_score` on a standard PTE scale or 10 to 90 - A `cefr_score` on a standard scale of A0 to C2 - A `toeic_score` on a standard scale of 0 to 200 In addition, the API returns segment (sentence) level scores to provide feedback on the speaker's weaknesses on the whole and at specific segments within the passage. The API result contains the following score fields under the `speech_score` node: \| **Field** \| **Description** \| \| --- \| --- \| \| transcript \| The speech-to-text transcript of what the user has said. \| \| speechace_score \| An overall score on a scale of 0 to 100, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| ielts_score \| An overall score on an IELTS scale of 0 to 9.0, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| pte_score \| An overall score on a PTE scale of 10 to 90, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| cefr_score \| An overall score on CEFR scale of A0 to C2, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| toeic_score \| An overall score on an TOEIC scale of 0 to 200, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| relevance.class \| TRUE or FALSE indicating whether the response was relevant given the `relevance_context` passed as input to the API. \| The following example snippet from the API results demonstrates the overall scores: `json { "status": "success", "speech_score": { "transcript": "But the residents have felt the strain, they to launched a healthy streets program, opening up, select streets to just walking and cycling. Now, this action proved valuable in helping residents life and broaden the benefit of their tax dollars. That typically pay to serve cars. New designs were implemented on South Congress. The iconic Main Street of Texas, Inn, Downtown Austin, the stretch of road has changed character overtime evolve e with advances in technology Civic priorities or public preferences with City council's Direction. This stretch of road now has just two fewer Lanes of car traffic. A third of the street space was given over to people bicycling and rolling on scooters. Taking them off the busy sidewalks better suited for dining under the oak trees and give them increased comfort and safety.", "relevance": { "class": "TRUE" }, "ielts_score": { "pronunciation": 8.5, "fluency": 9, "grammar": 8.5, "coherence": 9, "vocab": 9, "overall": 9 }, "pte_score": { "pronunciation": 86, "fluency": 87, "grammar": 86, "coherence": 90, "vocab": 89, "overall": 87 }, "speechace_score": { "pronunciation": 97, "fluency": 98, "grammar": 97, "coherence": 100, "vocab": 99, "overall": 98 }, "toeic_score": { "pronunciation": 190, "fluency": 200, "grammar": 190, "coherence": 200, "vocab": 200, "overall": 200 }, "cefr_score": { "pronunciation": "C2", "fluency": "C2", "grammar": "C2", "coherence": "C2", "vocab": "C2", "overall": "C2" } ... } } ` ### Feedback Metrics In addition, the API returns the following feedback nodes: \| **Node** \| **Description** \| \| --- \| --- \| \| fluency \| This node contains fluency metrics and subscores for the overall utterance and for each segment (sentence) within the utterance. \| \| word_score_list\[\] \| This node contains pronunciation scores and metrics for each word, syllable, and phoneme within the utterance. \| \| grammar \| This node contains grammar metrics, errors and feedback for the overall utterance. \| \| vocab \| This node contains vocabulary metrics, errors and feedback for the overall utterance. \| \| coherence \| This node contains coherence metrics, errors and feedback for the overall utterance. \| |
+
+## scoreAWordOrSentence
+
+**In this example we score pronunciation of a word or sentence** The overall score is returned as a `speechace_score` on a scale of 0 to 100. In addition, the API returns a `quality_score` on a scale of 0 to 100 for each word, syllable, and phoneme in the utterance which allows pin-pointed feedback on pronunciation mistakes made by the speaker. ### Overall Score The API result contains the following score field under the `text_score` node: \| **Field** \| **Description** \| \| --- \| --- \| \| speecahce_score.pronunciation \| An overall pronunciation score for the the entire utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric. \| ### **Feedback Subscores** In addition the API returns the following lists of elements and subscores. \| Field \| Description \| \| --- \| --- \| \| word_score_list\[\] \| a list of words in the utterance, each with it's own quality_score \| \| syllable_score_list\[\] \| a list of syllables in each word in the word_score_list\[\], each with it's own quality_score \| \| phone_score_list\[\] \| a list of phonemes in each word in the word_score_list\[\], each with it's own quality_score \| Each element has its own `quality_score` (see [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116)), its `extent` information marking its begin and end in time (see [guide](https://docs.speechace.com/#84c3936d-d51f-464e-8157-9ffc701ade96)) and additional fields. For example each element in `phone_score_list[]` identifies the expected `phone` in [Arpabet phonetic notation](https://docs.speechace.com/#bbde2f96-dedf-41f9-803d-b40801a969bb) and the actual `sound_most_like` phone based on the speaker's attempt. It also includes the `word_extent` for that phone to enable [mapping to its corresponding letters](https://docs.speechace.com/#3381d375-76bd-4a3a-bcd0-af029e752484) in the word. This enables Applications to visually demonstrate pronunciation errors to the speaker. `json "word_score_list":[ { "word": "Some", "quality_score": 100, "phone_score_list": [ { "phone": "s", "stress_level": null, "extent": [10,27], "quality_score": 99.05882352941177, "sound_most_like": "s" }, { "phone": "ah", "stress_level": 1, "extent": [27,36], "quality_score": 100, "stress_score": 100, "sound_most_like": "ah" }, ... } ] `
+
+- HTTP Method: `POST`
+- Endpoint: `/api/scoring/text/v9/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------ | :---------------------------------------------------------------------- | :------- | :-------------------------------------------------------------------------------------------------- |
+| body | [ScoreAWordOrSentenceRequest](../models/ScoreAWordOrSentenceRequest.md) | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace. |
+| dialect | string | ❌ | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
+| userId | string | ❌ | Optional: A unique anonymized identifier for the end-user who spoke the audio. |
+| \_\_ | string | ❌ | |
+
+**Return Type**
+
+`ScoreAWordOrSentenceOkResponse`
+
+**Example Usage Code Snippet**
+
+```typescript
+import { ScoreAWordOrSentenceRequest, Speechaceapi } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input: ScoreAWordOrSentenceRequest = {
+ includeFluency: '1',
+ includeUnknownWords: '1',
+ noMc: '1',
+ text: 'Yo vivo en Granada, una ciudad pequeña que tiene monumentos muy importantes como la Alhambra. Aquí la comida es deliciosa y son famosos el gazpacho y el salmorejo.',
+ userAudioFile: user_audio_file,
+ };
+
+ const { data } = await speechaceapi.v9Latest_.scoreAWordOrSentence(input, {
+ key: '{{speechacekey}}',
+ dialect: 'en-us',
+ userId: 'XYZ-ABC-99001',
+ __: 'sit molli',
+ });
+
+ console.log(data);
+})();
+```
+
+## scoreAPhonemeList
+
+**In this example we score the term:** "gotcha" /g/ao1/ch/ah0 Since **gotcha** is an american vernacular and not a valid dictionary word we use the phoneme list API to score it. The phoneme list uses a different url endpoint and expects the list of phonemes in [Arpabet notation](https://en.wikipedia.org/wiki/Arpabet). Note that we specify phoneme stress as 0,1,2 per Arpabet notation. This API allows you to score any word or sentence that can phonetically expressed in Arpabet.
+
+- HTTP Method: `POST`
+- Endpoint: `/api/scoring/phone_list/v9/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------ | :---------------------------------------------------------------- | :------- | :-------------------------------------------------------------------------------------------------- |
+| body | [ScoreAPhonemeListRequest](../models/ScoreAPhonemeListRequest.md) | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace. |
+| userId | string | ❌ | Optional: A unique anonymized identifier for the end-user who spoke the audio. |
+| dialect | string | ❌ | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
+
+**Return Type**
+
+`ScoreAPhonemeListOkResponse`
+
+**Example Usage Code Snippet**
+
+```typescript
+import { ScoreAPhonemeListRequest, Speechaceapi } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input: ScoreAPhonemeListRequest = {
+ phoneList: 'g|ao|ch|ah',
+ questionInfo: "'u1/q1'",
+ userAudioFile: user_audio_file,
+ };
+
+ const { data } = await speechaceapi.v9Latest_.scoreAPhonemeList(input, {
+ key: '{{speechacekey}}',
+ userId: 'XYZ-ABC-99001',
+ dialect: 'en-us',
+ });
+
+ console.log(data);
+})();
+```
+
+## validateText
+
+In this example we validate whether all the words in the text exist in the Speechace lexicon. This API allows you to quickly check whether authored content will be able to be scored with Speechace. This is useful to use at the time of text authoring to avoid errors later on. Out of lexicon terms can be reported to [support@speechace.com](mailto:support@speechace.com) for inclusion. Or you can see the phoneme list API as an alternative. You may also opt let Speechace API [automatically handle unknown words](https://docs.speechace.com/#2f59fc09-d3ef-410c-b9e8-ee91dddc0eec) by finding the most likely phonetic mapping for the term.
+
+- HTTP Method: `POST`
+- Endpoint: `/api/validating/text/v9/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------ | :----- | :------- | :------------------------------------------------------------------------------------------------------------------------- |
+| body | any | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace. |
+| text | string | ❌ | A sentence or sequence of words to validate. |
+| dialect | string | ❌ | The dialect to use for validation. Default is "en-us". Supported values are "en-us" (US English) and "en-gb" (UK English). |
+
+**Return Type**
+
+`ValidateTextOkResponse`
+
+**Example Usage Code Snippet**
+
+```typescript
+import { Speechaceapi } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input = {};
+
+ const { data } = await speechaceapi.v9Latest_.validateText(input, {
+ key: '{{speechacekey}}',
+ text: '"Validate these words existeee."',
+ dialect: 'en-us',
+ });
+
+ console.log(data);
+})();
+```
+
+## scoreTask
+
+This section contains a full description of the Score Task request type. In the subsequent sections you can find specific request examples for the following task types: - describe-image - retell-lecture - answer-question
+
+- HTTP Method: `POST`
+- Endpoint: `/api/scoring/task/v9/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------- | :------------------------------------------------ | :------- | :---------------------------------------------------------------------------------------------- |
+| body | [ScoreTaskRequest](../models/ScoreTaskRequest.md) | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace |
+| taskType | string | ❌ | The task_type to score. Supported types are: describe-image, retell-lecture, answer-question. |
+| dialect | string | ❌ | The dialect to use for scoring. Supported values are: en-us, en-gb, fr-fr, fr-ca, es-es, es-mx. |
+
+**Example Usage Code Snippet**
+
+```typescript
+import { ScoreTaskRequest, Speechaceapi } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input: ScoreTaskRequest = {
+ includeSpeechScore: '0',
+ taskQuestion:
+ 'What do you call a system of government in which people vote for the people who will represent them?',
+ userAudioText: 'elections',
+ };
+
+ const { data } = await speechaceapi.v9Latest_.scoreTask(input, {
+ key: '{{speechace_premiumkey}}',
+ taskType: 'task_type',
+ dialect: 'dialect',
+ });
+
+ console.log(data);
+})();
+```
+
+## transcribeScore
+
+**In this example we transcribe a free speaking audio and score the response providing an estimated IELTS and CEFR score for each of the following aspects:** - Fluency - Pronunciation - Grammar - Vocabulary - Coherence The API accepts the user audio and a `relevance_context` as inputs. The `relevance_context` is typically a question prompt provided to the user and is used to provide a relevance assessment of whether the user's response is relevant or not. Irrelevant answers have the overall IELTS score automatically set to zero and a warning is returned in the `score_issue_list[]` in the API result. ### Overall Scores The overall score is returned in 5 formats. See the [Scoring Rubrics Guide](https://docs.speechace.com/#1a63edfe-1c4d-4c49-a694-95ee9638ebbe) to understand how the different formats map to each other: - A `speechace_score` on a scale of 0 to 100 - An `ielts_score` on a standard IELTS scale of 0 to 9.0 - A `pte_score` on a standard PTE scale or 10 to 90 - A `cefr_score` on a standard scale of A0 to C2 - A `toeic_score` on a standard scale of 0 to 200 In addition, the API returns segment (sentence) level scores to provide feedback on the speaker's weaknesses on the whole and at specific segments within the passage. The API result contains the following score fields under the `speech_score` node: \| **Field** \| **Description** \| \| --- \| --- \| \| transcript \| The speech-to-text transcript of what the user has said. \| \| speechace_score \| An overall score on a scale of 0 to 100, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| ielts_score \| An overall score on an IELTS scale of 0 to 9.0, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| pte_score \| An overall score on a PTE scale of 10 to 90, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| cefr_score \| An overall score on CEFR scale of A0 to C2, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| toeic_score \| An overall score on an TOEIC scale of 0 to 200, in addition to subscores for: Fluency, Pronunciation, Grammar, Vocabulary, Coherence. \| \| relevance.class \| TRUE or FALSE indicating whether the response was relevant given the `relevance_context` passed as input to the API. \| The following example snippet from the API results demonstrates the overall scores: `json { "status": "success", "speech_score": { "transcript": "But the residents have felt the strain, they to launched a healthy streets program, opening up, select streets to just walking and cycling. Now, this action proved valuable in helping residents life and broaden the benefit of their tax dollars. That typically pay to serve cars. New designs were implemented on South Congress. The iconic Main Street of Texas, Inn, Downtown Austin, the stretch of road has changed character overtime evolve e with advances in technology Civic priorities or public preferences with City council's Direction. This stretch of road now has just two fewer Lanes of car traffic. A third of the street space was given over to people bicycling and rolling on scooters. Taking them off the busy sidewalks better suited for dining under the oak trees and give them increased comfort and safety.", "relevance": { "class": "TRUE" }, "ielts_score": { "pronunciation": 8.5, "fluency": 9, "grammar": 8.5, "coherence": 9, "vocab": 9, "overall": 9 }, "pte_score": { "pronunciation": 86, "fluency": 87, "grammar": 86, "coherence": 90, "vocab": 89, "overall": 87 }, "speechace_score": { "pronunciation": 97, "fluency": 98, "grammar": 97, "coherence": 100, "vocab": 99, "overall": 98 }, "toeic_score": { "pronunciation": 190, "fluency": 200, "grammar": 190, "coherence": 200, "vocab": 200, "overall": 200 }, "cefr_score": { "pronunciation": "C2", "fluency": "C2", "grammar": "C2", "coherence": "C2", "vocab": "C2", "overall": "C2" } ... } } ` ### Feedback Metrics In addition, the API returns the following feedback nodes: \| **Node** \| **Description** \| \| --- \| --- \| \| fluency \| This node contains fluency metrics and subscores for the overall utterance and for each segment (sentence) within the utterance. \| \| word_score_list\[\] \| This node contains pronunciation scores and metrics for each word, syllable, and phoneme within the utterance. \| \| grammar \| This node contains grammar metrics, errors and feedback for the overall utterance. \| \| vocab \| This node contains vocabulary metrics, errors and feedback for the overall utterance. \| \| coherence \| This node contains coherence metrics, errors and feedback for the overall utterance. \|
+
+- HTTP Method: `POST`
+- Endpoint: `/api/scoring/speech/v9/json`
+
+**Parameters**
+
+| Name | Type | Required | Description |
+| :------ | :------------------------------------------------------------ | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| body | [TranscribeScoreRequest](../models/TranscribeScoreRequest.md) | ❌ | The request body. |
+| key | string | ❌ | API key issued by Speechace. |
+| dialect | string | ❌ | The dialect to use for scoring. Supported values are: en-us (US English) en-gb (UK English) fr-fr (French France) fr-ca (French Canada) es-es (Spanish Spain) es-mx (Spanish Mexico) |
+| userId | string | ❌ | Optional: A unique anonymized identifier for the end-user who spoke the audio. |
+
+**Return Type**
+
+`TranscribeScoreOkResponse`
+
+**Example Usage Code Snippet**
+
+```typescript
+import { Speechaceapi, TranscribeScoreRequest } from 'speechaceapi';
+
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input: TranscribeScoreRequest = {
+ includeIeltsFeedback: '1',
+ questionInfo: "'u1/q1'",
+ userAudioFile: user_audio_file,
+ };
+
+ const { data } = await speechaceapi.v9Latest_.transcribeScore(input, {
+ key: '{{speechace_premiumkey}}',
+ dialect: 'en-us',
+ userId: 'XYZ-ABC-99001',
+ });
+
+ console.log(data);
+})();
+```
+
+
diff --git a/examples/.env.example b/examples/.env.example
deleted file mode 100644
index f05954a..0000000
--- a/examples/.env.example
+++ /dev/null
@@ -1,2 +0,0 @@
-# This file was generated by liblab | https://liblab.com/
-
diff --git a/examples/README.md b/examples/README.md
index d495ba0..0f332ee 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,4 +1,4 @@
-# speechaceapi-example
+# speechaceapi
A basic example of how to use the speechaceapi package.
@@ -25,3 +25,5 @@ To run the example, run the following command in the examples folder:
```sh
npm run start
```
+
+
diff --git a/examples/package.json b/examples/package.json
index e6eefc0..051cf27 100644
--- a/examples/package.json
+++ b/examples/package.json
@@ -1,18 +1,18 @@
{
- "name": "speechaceapi-example",
+ "name": "speechaceapi",
"version": "1.0.0",
"private": true,
"dependencies": {
- "speechaceapi": "file:../"
+ "speechaceapi": "file:../",
+ "zod": "3.22.0"
},
"scripts": {
"setup": "npm --prefix ../ install && npm --prefix ../ run build && npm install",
- "start": "tsc && node -r dotenv/config dist/index.js",
+ "start": "tsc && node dist/index.js",
"dev": "ts-node src/index.ts"
},
"devDependencies": {
"ts-node": "^10.9.1",
- "typescript": "^4.6.0",
- "dotenv": "^8.2.0"
+ "typescript": "5.3.3"
}
}
diff --git a/examples/src/index.ts b/examples/src/index.ts
index 51a412b..fe3a52a 100644
--- a/examples/src/index.ts
+++ b/examples/src/index.ts
@@ -2,4 +2,16 @@
import { Speechaceapi } from 'speechaceapi';
-// No simple endpoint service was given
+(async () => {
+ const speechaceapi = new Speechaceapi({});
+
+ const input = {};
+
+ const { data } = await speechaceapi.v9Latest_.validateText(input, {
+ key: '{{speechacekey}}',
+ text: '"Validate these words existeee."',
+ dialect: 'en-us',
+ });
+
+ console.log(data);
+})();
diff --git a/examples/tsconfig.json b/examples/tsconfig.json
index a63d73c..9cf6bf8 100644
--- a/examples/tsconfig.json
+++ b/examples/tsconfig.json
@@ -1,103 +1,22 @@
{
"compilerOptions": {
- /* Visit https://aka.ms/tsconfig to read more about this file */
-
- /* Projects */
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
-
- /* Language and Environment */
- "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
- // "jsx": "preserve", /* Specify what JSX code is generated. */
- // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
-
- /* Modules */
- "module": "commonjs" /* Specify what module code is generated. */,
- "rootDir": "./src" /* Specify the root folder within your source files. */,
- // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
- // "resolveJsonModule": true, /* Enable importing .json files. */
- // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */
-
- /* JavaScript Support */
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
-
- /* Emit */
- // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
- "outDir": "./dist" /* Specify an output folder for all emitted files. */,
- // "removeComments": true, /* Disable emitting comments. */
- // "noEmit": true, /* Disable emitting files from a compilation. */
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
- // "newLine": "crlf", /* Set the newline character for emitting files. */
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
-
- /* Interop Constraints */
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
- "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
- "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
-
- /* Type Checking */
- "strict": true /* Enable all strict type-checking options. */,
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
-
- /* Completeness */
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
- }
+ "target": "es6",
+ "module": "commonjs",
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "strict": true,
+ "skipLibCheck": true,
+ "outDir": "./dist",
+ "rootDir": "./src",
+ "noImplicitAny": true,
+ "baseUrl": "./",
+ "declaration": true,
+ "moduleResolution": "node",
+ "isolatedModules": true,
+ "allowSyntheticDefaultImports": true,
+ "declarationMap": true,
+ "lib": ["es2017", "dom"],
+ "sourceMap": true
+ },
+ "include": ["src/"]
}
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..d4b3084
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,40 @@
+{
+ "name": "speechaceapi",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "speechaceapi",
+ "version": "1.0.0",
+ "license": "MIT",
+ "dependencies": {
+ "zod": "3.22.0"
+ },
+ "devDependencies": {
+ "typescript": "5.3.3"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
+ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/zod": {
+ "version": "3.22.0",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.0.tgz",
+ "integrity": "sha512-y5KZY/ssf5n7hCGDGGtcJO/EBJEm5Pa+QQvFBeyMOtnFYOSflalxIFFvdaYevPhePcmcKC4aTbFkCcXN7D0O8Q==",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
index 8eaf244..cad236f 100644
--- a/package.json
+++ b/package.json
@@ -1,57 +1,24 @@
{
- "source": "./src/index.ts",
- "exports": {
- "require": "./dist/commonjs/index.js",
- "types": "./dist/commonjs/index.d.ts",
- "default": "./dist/esm/index.js"
+ "name": "speechaceapi",
+ "version": "1.0.0",
+ "description": "[Speechace](https://www.speechace.com) is a Speech Recognition API for fluency and pronunciation assessment. Our patented technology is unique in its ability to score a learner's speech and pinpoint individual syllable and phoneme level mistakes in a user's pronunciation in real time.",
+ "main": "dist/index.js",
+ "types": "dist/index.d.ts",
+ "scripts": {
+ "build": "tsc"
},
- "main": "./dist/commonjs/index.js",
- "module": "./dist/esm/index.js",
- "browser": "./dist/index.umd.js",
- "unpkg": "./dist/index.umd.js",
- "types": "./dist/commonjs/index.d.ts",
- "files": [
- "dist",
- "README.md"
+ "keywords": [
+ "typescript",
+ "sdk",
+ "api",
+ "client"
],
+ "author": "LibLab",
+ "license": "MIT",
"devDependencies": {
- "@typescript-eslint/eslint-plugin": "^5.43.0",
- "@typescript-eslint/parser": "^5.43.0",
- "@types/node": "^17.0.23",
- "@types/jest": "^29.5.6",
- "eslint": "^8.20.0",
- "eslint-config-airbnb-base": "^15.0.0",
- "eslint-config-airbnb-typescript": "^17.0.0",
- "eslint-config-prettier": "^8.5.0",
- "eslint-plugin-import": "^2.26.0",
- "eslint-plugin-prettier": "^4.2.1",
- "jest": "^29.7.0",
- "nock": "^13.2.4",
- "prettier": "^2.6.2",
- "ts-jest": "^29.1.1",
- "typescript": "^4.6.0"
- },
- "scripts": {
- "build": "npm run build:all",
- "build:cjs": "tsc --module commonjs --outDir dist/commonjs",
- "build:esm": "tsc --module esnext --outDir dist/esm",
- "build:umd": "tsc --module umd --outDir dist/umd",
- "build:all": "npm run build:cjs && npm run build:esm && npm run build:umd",
- "lint": "eslint --ext .ts,.js ./src/ --resolve-plugins-relative-to .",
- "lint:ci": "eslint --ext .ts,.js ./src/ --resolve-plugins-relative-to . --cache --quiet",
- "lint:fix": "eslint --ext .ts,.js ./src/ --resolve-plugins-relative-to . --cache --fix",
- "rebuild": "rm -rf dist/ && tsc",
- "test": "jest --detectOpenHandles",
- "watch": "rm -rf dist/ && tsc -w",
- "version": "tsc --version",
- "prepublishOnly": "npm run build"
+ "typescript": "5.3.3"
},
- "name": "speechaceapi",
- "description": "Speechaceapi - [Speechace](https://www.speechace.com) is a Speech Recognition API for fluency and pronunciation assessment. Our patented technology is unique in its ability to score a learner's speech and pinpoint individual syllable and phoneme level mistakes in a user's pronunciation in real time.",
- "version": "1.0.0",
- "author": "Speechaceapi",
"dependencies": {
- "axios": "^1.0.0"
- },
- "license": "MIT"
+ "zod": "3.22.0"
+ }
}
diff --git a/src/BaseService.ts b/src/BaseService.ts
deleted file mode 100644
index 3d630e4..0000000
--- a/src/BaseService.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import FormData from 'form-data';
-import { Environment } from './http/Environment';
-import HTTPLibrary from './http/HTTPLibrary';
-
-export default class BaseService {
- public baseUrl: string = Environment.DEFAULT;
-
- public httpClient = new HTTPLibrary();
-
- setBaseUrl(url: string): void {
- this.baseUrl = url;
- }
-
- static patternMatching(value: string, pattern: string, variableName: string): string {
- if (!value) {
- throw new Error(`${variableName} cannot be null or undefined`);
- }
- if (!value.match(new RegExp(pattern))) {
- throw new Error(`Invalid value for ${variableName}: must match ${pattern}`);
- }
- return value;
- }
-
- /**
- * Converts model objects to FormData for multipart/form-data requests
- *
- * @param {any} input The original data that fills a model
- * @return {FormData} The input converted to a form
- */
- static formData(input: { [key: string]: any }): any {
- const formData = new FormData();
- const flatInput: { [key: string]: any } = BaseService.flattenObject(input, '');
- Object.keys(flatInput).forEach((key) => {
- const value = flatInput[key];
- if (value !== undefined && value !== null) {
- if (value instanceof Date) {
- formData.append(key, value.toISOString());
- } else if (typeof value === 'boolean') {
- formData.append(key, value ? 'true' : 'false');
- } else if (value instanceof Array) {
- formData.append(key, value.join(','));
- } else {
- formData.append(key, value);
- }
- }
- });
- return formData;
- }
-
- /**
- * Flattens an object into a single level object
- * @param {Object} obj The object to flatten
- * @param {string} parentKey The parent key
- * @return {Object} The flattened object
- */
- static flattenObject = (obj: { [key: string]: any }, parentKey?: string): Object => {
- let result: { [key: string]: any } = {};
- Object.keys(obj).forEach((key) => {
- const value: any = obj[key];
- if (Object.hasOwn(value, '_readableState')) {
- result[key] = value;
- return;
- }
- if (
- Object.hasOwn(value, 'name') &&
- Object.hasOwn(value, 'lastModified') &&
- Object.hasOwn(value, 'size') &&
- Object.hasOwn(value, 'type') &&
- Object.hasOwn(value, 'webkitRelativePath')
- ) {
- result[key] = value;
- return;
- }
-
- if (value instanceof Array || value.path) {
- result[key] = value;
- return;
- }
-
- const formattedKey: string = parentKey ? `${parentKey}.${key}` : key;
-
- if (typeof value === 'object' && value !== null) {
- result = { ...result, ...BaseService.flattenObject(value, formattedKey) };
- } else {
- result[formattedKey] = value;
- }
- });
- return result;
- };
-
- static urlEncode = (input: { [key: string]: any }): string =>
- Object.keys(input)
- .map((key) => `${key}=${encodeURIComponent(input[key])}`)
- .join('&');
-}
diff --git a/src/hooks/Hook.ts b/src/hooks/Hook.ts
deleted file mode 100644
index 5801d44..0000000
--- a/src/hooks/Hook.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface Request {
- method: string;
- url: string;
- input?: object;
- headers: object;
-}
-
-export interface Response {
- data: object;
- headers: object;
- status: number;
-}
-
-export interface Exception extends Error {
- title: string;
- type?: string;
- detail?: string;
- instance?: string;
- statusCode: number;
-}
-
-export interface Hook {
- beforeRequest(request: Request): Promise;
-
- afterResponse(request: Request, response: Response): Promise;
-
- onError(error: Exception): Promise;
-}
diff --git a/src/http/HTTPClient.ts b/src/http/HTTPClient.ts
deleted file mode 100644
index 2458931..0000000
--- a/src/http/HTTPClient.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface Headers extends Record {}
-
-/**
- * Defines the basic operations for an HTTP client.
- */
-export default interface HTTPClient {
- get(url: string, input: any, headers: Headers, retry?: boolean): Promise;
- post(url: string, input: any, headers: Headers, retry?: boolean): Promise;
- delete(url: string, input: any, headers: Headers, retry?: boolean): Promise;
- put(url: string, input: any, headers: Headers, retry?: boolean): Promise;
- patch(url: string, input: any, headers: Headers, retry?: boolean): Promise;
-}
diff --git a/src/http/HTTPLibrary.ts b/src/http/HTTPLibrary.ts
deleted file mode 100644
index b2b8ce7..0000000
--- a/src/http/HTTPLibrary.ts
+++ /dev/null
@@ -1,176 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import FormData from 'form-data';
-
-import axios, { AxiosError } from 'axios';
-
-import HTTPClient, { Headers } from './HTTPClient';
-import throwHttpError from './httpExceptions';
-
-// Ignore TS errors when checking if we are running inside Deno or Bun
-declare const Deno: any;
-declare const Bun: any;
-
-export default class HTTPLibrary implements HTTPClient {
- readonly retryAttempts: number = 3;
- readonly retryDelayMs: number = 150;
-
- private static readonly responseMapper: Map = new Map([
- ['type', 'type_'],
- ['class', 'class_'],
- ]);
-
- private readonly requestMapper: Map = new Map([
- ['type_', 'type'],
- ['class_', 'class'],
- ]);
-
- async get(url: string, input: any, headers: Headers, retry: boolean = false): Promise {
- const request = () =>
- axios.get(url, {
- headers: { ...headers, ...this.getUserAgentHeader() },
- data:
- Object.keys(input).length > 0
- ? HTTPLibrary.convertKeysWithMapper(input, this.requestMapper)
- : undefined,
- });
-
- const response = retry
- ? await this.retry(this.retryAttempts, request, this.retryDelayMs)
- : await request();
- return HTTPLibrary.handleResponse(response);
- }
-
- async post(url: string, input: any, headers: Headers, retry: boolean = false): Promise {
- const request = () =>
- axios.post(url, HTTPLibrary.convertKeysWithMapper(input, this.requestMapper), {
- headers: { ...headers, ...this.getUserAgentHeader() },
- });
-
- const response = retry
- ? await this.retry(this.retryAttempts, request, this.retryDelayMs)
- : await request();
-
- return HTTPLibrary.handleResponse(response);
- }
-
- async delete(url: string, input: any, headers: Headers, retry: boolean = false): Promise {
- const request = () =>
- axios.delete(url, {
- headers: { ...headers, ...this.getUserAgentHeader() },
- data: HTTPLibrary.convertKeysWithMapper(input, this.requestMapper),
- });
-
- const response = retry
- ? await this.retry(this.retryAttempts, request, this.retryDelayMs)
- : await request();
-
- return HTTPLibrary.handleResponse(response);
- }
-
- async put(url: string, input: any, headers: Headers, retry: boolean = false): Promise {
- const request = () =>
- axios.put(url, HTTPLibrary.convertKeysWithMapper(input, this.requestMapper), {
- headers: { ...headers, ...this.getUserAgentHeader() },
- });
-
- const response = retry
- ? await this.retry(this.retryAttempts, request, this.retryDelayMs)
- : await request();
-
- return HTTPLibrary.handleResponse(response);
- }
-
- async patch(url: string, input: any, headers: Headers, retry: boolean = false): Promise {
- const request = () =>
- axios.patch(url, HTTPLibrary.convertKeysWithMapper(input, this.requestMapper), {
- headers: { ...headers, ...this.getUserAgentHeader() },
- });
-
- const response = retry
- ? await this.retry(this.retryAttempts, request, this.retryDelayMs)
- : await request();
-
- return HTTPLibrary.handleResponse(response);
- }
-
- async retry(retries: number, callbackFn: () => any, delay: number): Promise {
- let result: any;
-
- try {
- result = await callbackFn();
- } catch (e: any) {
- if ((e as AxiosError).isAxiosError) {
- if (e.response) {
- if (![500, 503, 504].includes(e.response.status)) {
- return e.response;
- }
- }
- }
- if (retries > 1) {
- // eslint-disable-next-line no-promise-executor-return
- await new Promise((resolve) => setTimeout(resolve, delay));
- result = await this.retry(retries - 1, callbackFn, delay * 2);
- } else {
- throw e;
- }
- }
-
- return result;
- }
-
- private static handleResponse(response: any) {
- if (response.status >= 400) {
- throwHttpError(response);
- }
-
- response.data = HTTPLibrary.convertKeysWithMapper(response.data, this.responseMapper);
-
- return response;
- }
-
- private getUserAgentHeader(): Headers {
- const userAgentBase = 'Speechaceapi/1.0.0';
-
- let userAgent = '';
- if (typeof window !== 'undefined') {
- return {};
- } else if (typeof process !== 'undefined') {
- userAgent = `Node.js/${process.version} ${userAgentBase}`;
- } else if (typeof Deno !== 'undefined') {
- userAgent = `Deno/${Deno.version.deno} ${userAgentBase}`;
- } else if (typeof Bun !== 'undefined') {
- userAgent = `Bun/${Bun.version} ${userAgentBase}`;
- } else {
- userAgent = userAgentBase;
- }
-
- return { 'User-Agent': userAgent };
- }
-
- /**
- *Converts keys in an object using a provided JSON mapper.
- * @param {any} obj - The object to convert keys for.
- * @param {Object} jsonMapper - The JSON mapper containing key mappings.
- * @returns {any} - The object with converted keys.
- */
- private static convertKeysWithMapper(obj: T, jsonMapper: Map): any {
- if (!obj || typeof obj !== 'object' || obj instanceof FormData) {
- return obj;
- }
-
- if (Array.isArray(obj)) {
- return obj.map((item) => HTTPLibrary.convertKeysWithMapper(item, jsonMapper));
- }
-
- const convertedObj: Record = {};
- Object.entries(obj).forEach(([key, value]) => {
- if (value !== undefined) {
- const convertedKey = jsonMapper.get(key) || key;
- convertedObj[convertedKey] = HTTPLibrary.convertKeysWithMapper(value, jsonMapper);
- }
- });
-
- return convertedObj;
- }
-}
diff --git a/src/http/QuerySerializer.ts b/src/http/QuerySerializer.ts
deleted file mode 100644
index 486526d..0000000
--- a/src/http/QuerySerializer.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export type Explode = boolean;
-export type QueryStyles = 'form' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
-export type PathStyles = 'simple' | 'label' | 'matrix';
-
-const styleMethods: Record = {
- form: (parameterName: string, parameterValue: unknown, explode: boolean) => {
- // Check if the parameterValue is an array
- if (Array.isArray(parameterValue)) {
- return explode
- ? parameterValue.map((value) => `${parameterName}=${value}`).join('&')
- : `${parameterName}=${parameterValue.join(',')}`;
- }
-
- // Check if the parameterValue is an object
- if (typeof parameterValue === 'object' && parameterValue !== null) {
- if (explode) {
- // Serialize object with exploded format: "key1=value1&key2=value2"
- return Object.entries(parameterValue)
- .map(([name, value]) => `${name}=${value}`)
- .join('&');
- }
- // Serialize object with non-exploded format: "key=key1,value1,key2,value2"
- return `${parameterName}=${Object.entries(parameterValue)
- .flatMap(([name, value]) => [name, value])
- .join(',')}`;
- }
-
- // For primitive values
- return `${parameterName}=${parameterValue}`;
- },
-};
-
-export function serializeQuery(
- style: QueryStyles,
- explode: Explode,
- key: string,
- value: unknown,
-): string {
- const method = styleMethods[style];
- if (!method) return '';
- return method(key, value, explode);
-}
diff --git a/src/http/client.ts b/src/http/client.ts
new file mode 100644
index 0000000..0e60af3
--- /dev/null
+++ b/src/http/client.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { SerializationStyle, serializePath, serializeQuery } from './serializer';
+import { HttpMethod, HttpResponse, Options, RetryOptions, SdkConfig } from './types';
+import { RequestHandlerChain } from './handlers/handler-chain';
+import { HookHandler } from './handlers/hook-handler';
+import { ResponseValidationHandler } from './handlers/response-validation-handler';
+import { RequestValidationHandler } from './handlers/request-validation-handler';
+import { CustomHook } from './hooks/custom-hook';
+import { TerminatingHandler } from './handlers/terminating-handler';
+import { RetryHandler } from './handlers/retry-handler';
+import { Request } from './transport/request';
+
+export class HttpClient {
+ private readonly requestHandlerChain = new RequestHandlerChain();
+
+ constructor(
+ private config: SdkConfig,
+ hook = new CustomHook(),
+ ) {
+ this.requestHandlerChain.addHandler(new ResponseValidationHandler());
+ this.requestHandlerChain.addHandler(new RequestValidationHandler());
+ this.requestHandlerChain.addHandler(new RetryHandler());
+ this.requestHandlerChain.addHandler(new HookHandler(hook));
+ this.requestHandlerChain.addHandler(new TerminatingHandler());
+ }
+
+ call(request: Request): Promise> {
+ return this.requestHandlerChain.callChain(request);
+ }
+
+ buildPath(
+ pathPattern: string,
+ pathArguments: Record,
+ style = SerializationStyle.SIMPLE,
+ explode = false,
+ ): string {
+ return serializePath(pathPattern, pathArguments, style, explode);
+ }
+
+ setBaseUrl(url: string): void {
+ this.config.baseUrl = url;
+ }
+
+ setConfig(config: SdkConfig): void {
+ this.config = config;
+ }
+}
diff --git a/src/http/error.ts b/src/http/error.ts
new file mode 100644
index 0000000..5bda646
--- /dev/null
+++ b/src/http/error.ts
@@ -0,0 +1,14 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { HttpMetadata } from './types';
+
+export class HttpError extends Error {
+ public readonly error: string;
+ public readonly metadata: HttpMetadata;
+
+ constructor(metadata: HttpMetadata, error?: string) {
+ super(error);
+ this.error = metadata.statusText;
+ this.metadata = metadata;
+ }
+}
diff --git a/src/http/errors/BadGateway.ts b/src/http/errors/BadGateway.ts
deleted file mode 100644
index a61dbd4..0000000
--- a/src/http/errors/BadGateway.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class BadGateway extends BaseHTTPError {
- statusCode = 502;
-
- title = 'Bad Gateway';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/BadRequest.ts b/src/http/errors/BadRequest.ts
deleted file mode 100644
index ebfdc8a..0000000
--- a/src/http/errors/BadRequest.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class BadRequest extends BaseHTTPError {
- statusCode = 400;
-
- title = 'Bad Request';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/Conflict.ts b/src/http/errors/Conflict.ts
deleted file mode 100644
index c7d480d..0000000
--- a/src/http/errors/Conflict.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class Conflict extends BaseHTTPError {
- statusCode = 409;
-
- title = 'Conflict';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/ExpectationFailed.ts b/src/http/errors/ExpectationFailed.ts
deleted file mode 100644
index e110b8f..0000000
--- a/src/http/errors/ExpectationFailed.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class ExpectationFailed extends BaseHTTPError {
- statusCode = 417;
-
- title = 'Expectation Failed';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/FailedDependency.ts b/src/http/errors/FailedDependency.ts
deleted file mode 100644
index 78269e3..0000000
--- a/src/http/errors/FailedDependency.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class FailedDependency extends BaseHTTPError {
- statusCode = 424;
-
- title = 'Failed Dependency';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/Forbidden.ts b/src/http/errors/Forbidden.ts
deleted file mode 100644
index eb54af8..0000000
--- a/src/http/errors/Forbidden.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class Forbidden extends BaseHTTPError {
- statusCode = 403;
-
- title = 'Forbidden';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/GatewayTimeout.ts b/src/http/errors/GatewayTimeout.ts
deleted file mode 100644
index 4dab240..0000000
--- a/src/http/errors/GatewayTimeout.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class GatewayTimeout extends BaseHTTPError {
- statusCode = 504;
-
- title = 'Gateway Timeout';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/Gone.ts b/src/http/errors/Gone.ts
deleted file mode 100644
index b7c6983..0000000
--- a/src/http/errors/Gone.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class Gone extends BaseHTTPError {
- statusCode = 410;
-
- title = 'Gone';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/HttpVersionNotSupported.ts b/src/http/errors/HttpVersionNotSupported.ts
deleted file mode 100644
index c4c5fe9..0000000
--- a/src/http/errors/HttpVersionNotSupported.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class HttpVersionNotSupported extends BaseHTTPError {
- statusCode = 505;
-
- title = 'HTTP Version Not Supported';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/InternalServerError.ts b/src/http/errors/InternalServerError.ts
deleted file mode 100644
index 7be4493..0000000
--- a/src/http/errors/InternalServerError.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class InternalServerError extends BaseHTTPError {
- statusCode = 500;
-
- title = 'Internal Server Error';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/LengthRequired.ts b/src/http/errors/LengthRequired.ts
deleted file mode 100644
index 46059af..0000000
--- a/src/http/errors/LengthRequired.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class LengthRequired extends BaseHTTPError {
- statusCode = 411;
-
- title = 'LengthRequired';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/Locked.ts b/src/http/errors/Locked.ts
deleted file mode 100644
index 7c8607d..0000000
--- a/src/http/errors/Locked.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class Locked extends BaseHTTPError {
- statusCode = 423;
-
- title = 'Locked';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/LoopDetected.ts b/src/http/errors/LoopDetected.ts
deleted file mode 100644
index aceb4e4..0000000
--- a/src/http/errors/LoopDetected.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class LoopDetected extends BaseHTTPError {
- statusCode = 508;
-
- title = 'Loop Detected';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/MethodNotAllowed.ts b/src/http/errors/MethodNotAllowed.ts
deleted file mode 100644
index 56b7588..0000000
--- a/src/http/errors/MethodNotAllowed.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class MethodNotAllowed extends BaseHTTPError {
- statusCode = 405;
-
- title = 'Method Not Allowed';
-
- allow?: string[];
-
- constructor(detail: string = '', allow?: string[]) {
- super(detail);
- this.allow = allow;
- }
-}
diff --git a/src/http/errors/MisdirectedRequest.ts b/src/http/errors/MisdirectedRequest.ts
deleted file mode 100644
index fa95de4..0000000
--- a/src/http/errors/MisdirectedRequest.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class MisdirectedRequest extends BaseHTTPError {
- statusCode = 421;
-
- title = 'Misdirected Request';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/NetworkAuthenticationRequired.ts b/src/http/errors/NetworkAuthenticationRequired.ts
deleted file mode 100644
index 06b0770..0000000
--- a/src/http/errors/NetworkAuthenticationRequired.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class NetworkAuthenticationRequired extends BaseHTTPError {
- statusCode = 511;
-
- title = 'Network Authentication Required';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/NotAcceptable.ts b/src/http/errors/NotAcceptable.ts
deleted file mode 100644
index 7d45a96..0000000
--- a/src/http/errors/NotAcceptable.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class NotAcceptable extends BaseHTTPError {
- statusCode = 406;
-
- title = 'Not Acceptable';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/NotExtended.ts b/src/http/errors/NotExtended.ts
deleted file mode 100644
index 1bbb8ce..0000000
--- a/src/http/errors/NotExtended.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class NotExtended extends BaseHTTPError {
- statusCode = 510;
-
- title = 'Not Extended';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/NotFound.ts b/src/http/errors/NotFound.ts
deleted file mode 100644
index ab0a265..0000000
--- a/src/http/errors/NotFound.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class NotFound extends BaseHTTPError {
- statusCode = 404;
-
- title = 'Not Found';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/NotImplemented.ts b/src/http/errors/NotImplemented.ts
deleted file mode 100644
index 0ffb365..0000000
--- a/src/http/errors/NotImplemented.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class NotImplemented extends BaseHTTPError {
- statusCode = 501;
-
- title = 'Not Implemented';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/PayloadTooLarge.ts b/src/http/errors/PayloadTooLarge.ts
deleted file mode 100644
index 17e6b8f..0000000
--- a/src/http/errors/PayloadTooLarge.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class PayloadTooLarge extends BaseHTTPError {
- statusCode = 413;
-
- title = 'Payload Too Large';
-
- retryAfter: number | null;
-
- constructor(detail: string = '', retryAfter: number | null = null) {
- super(detail);
- this.retryAfter = retryAfter;
- }
-}
diff --git a/src/http/errors/PaymentRequired.ts b/src/http/errors/PaymentRequired.ts
deleted file mode 100644
index e623260..0000000
--- a/src/http/errors/PaymentRequired.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class PaymentRequired extends BaseHTTPError {
- statusCode = 402;
-
- title = 'Payment Required';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/PreconditionFailed.ts b/src/http/errors/PreconditionFailed.ts
deleted file mode 100644
index 282ca7a..0000000
--- a/src/http/errors/PreconditionFailed.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class PreconditionFailed extends BaseHTTPError {
- statusCode = 412;
-
- title = 'PreconditionFailed';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/PreconditionRequired.ts b/src/http/errors/PreconditionRequired.ts
deleted file mode 100644
index bebfa34..0000000
--- a/src/http/errors/PreconditionRequired.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class PreconditionRequired extends BaseHTTPError {
- statusCode = 428;
-
- title = 'Precondition Required';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/ProxyAuthenticationRequired.ts b/src/http/errors/ProxyAuthenticationRequired.ts
deleted file mode 100644
index 73bd14e..0000000
--- a/src/http/errors/ProxyAuthenticationRequired.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { AuthenticateChallenge, BaseHTTPError } from './base';
-
-export default class ProxyAuthenticationRequired extends BaseHTTPError {
- statusCode = 407;
-
- title = 'Proxy Authentication Required';
-
- proxyAuthenticate?: AuthenticateChallenge;
-
- constructor(detail: string = '', proxyAuthenticate?: AuthenticateChallenge) {
- super(detail);
- this.proxyAuthenticate = proxyAuthenticate;
- }
-}
diff --git a/src/http/errors/RangeNotSatisfiable.ts b/src/http/errors/RangeNotSatisfiable.ts
deleted file mode 100644
index 304b975..0000000
--- a/src/http/errors/RangeNotSatisfiable.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class RangeNotSatisfiable extends BaseHTTPError {
- statusCode = 416;
-
- title = 'Range Not Satisfiable';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/RequestHeaderFieldsTooLarge.ts b/src/http/errors/RequestHeaderFieldsTooLarge.ts
deleted file mode 100644
index 1b69cee..0000000
--- a/src/http/errors/RequestHeaderFieldsTooLarge.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class RequestHeaderFieldsTooLarge extends BaseHTTPError {
- statusCode = 431;
-
- title = 'Request Header Fields Too Large';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/RequestTimeout.ts b/src/http/errors/RequestTimeout.ts
deleted file mode 100644
index 7378312..0000000
--- a/src/http/errors/RequestTimeout.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class RequestTimeout extends BaseHTTPError {
- statusCode = 408;
-
- title = 'Request Timeout';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/ServiceUnavailable.ts b/src/http/errors/ServiceUnavailable.ts
deleted file mode 100644
index 64051aa..0000000
--- a/src/http/errors/ServiceUnavailable.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class ServiceUnavailable extends BaseHTTPError {
- statusCode = 503;
-
- title = 'Service Unavailable';
-
- retryAfter: number | null;
-
- constructor(detail: string = '', retryAfter: number | null = null) {
- super(detail);
- this.retryAfter = retryAfter;
- }
-}
diff --git a/src/http/errors/TooEarly.ts b/src/http/errors/TooEarly.ts
deleted file mode 100644
index ca2a185..0000000
--- a/src/http/errors/TooEarly.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class TooEarly extends BaseHTTPError {
- statusCode = 425;
-
- title = 'Too Early';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/TooManyRequests.ts b/src/http/errors/TooManyRequests.ts
deleted file mode 100644
index 3ab6328..0000000
--- a/src/http/errors/TooManyRequests.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class TooManyRequests extends BaseHTTPError {
- statusCode = 429;
-
- title = 'Too Many Requests';
-
- retryAfter: number | null;
-
- constructor(detail: string = '', retryAfter: number | null = null) {
- super(detail);
- this.retryAfter = retryAfter;
- }
-}
diff --git a/src/http/errors/Unauthorized.ts b/src/http/errors/Unauthorized.ts
deleted file mode 100644
index 3e04ff2..0000000
--- a/src/http/errors/Unauthorized.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { AuthenticateChallenge, BaseHTTPError } from './base';
-
-export default class Unauthorized extends BaseHTTPError {
- statusCode = 401;
-
- title = 'Unauthorized';
-
- wwwAuthenticate?: AuthenticateChallenge;
-
- constructor(detail: string = '', wwwAuthenticate?: AuthenticateChallenge) {
- super(detail);
- this.wwwAuthenticate = wwwAuthenticate;
- }
-}
diff --git a/src/http/errors/UnavailableForLegalReasons.ts b/src/http/errors/UnavailableForLegalReasons.ts
deleted file mode 100644
index d079b6c..0000000
--- a/src/http/errors/UnavailableForLegalReasons.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class UnavailableForLegalReasons extends BaseHTTPError {
- statusCode = 451;
-
- title = 'Unavailable For Legal Reasons';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/UnprocessableEntity.ts b/src/http/errors/UnprocessableEntity.ts
deleted file mode 100644
index 5f71072..0000000
--- a/src/http/errors/UnprocessableEntity.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class UnprocessableEntity extends BaseHTTPError {
- statusCode = 422;
-
- title = 'Unprocessable Entity';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/UnsufficientStorage.ts b/src/http/errors/UnsufficientStorage.ts
deleted file mode 100644
index e488f4b..0000000
--- a/src/http/errors/UnsufficientStorage.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class UnsufficientStorage extends BaseHTTPError {
- statusCode = 507;
-
- title = 'Unsufficient Storage';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/UnsupportedMediaType.ts b/src/http/errors/UnsupportedMediaType.ts
deleted file mode 100644
index c90fbf9..0000000
--- a/src/http/errors/UnsupportedMediaType.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class UnsupportedMediaType extends BaseHTTPError {
- statusCode = 415;
-
- title = 'Unsupported Media Type';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/UpgradeRequired.ts b/src/http/errors/UpgradeRequired.ts
deleted file mode 100644
index 5565147..0000000
--- a/src/http/errors/UpgradeRequired.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class UpgradeRequired extends BaseHTTPError {
- statusCode = 426;
-
- title = 'Upgrade Required';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/UriTooLong.ts b/src/http/errors/UriTooLong.ts
deleted file mode 100644
index 02eb5a8..0000000
--- a/src/http/errors/UriTooLong.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class UriTooLong extends BaseHTTPError {
- statusCode = 414;
-
- title = 'URI Too Long';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/VariantAlsoNegotiates.ts b/src/http/errors/VariantAlsoNegotiates.ts
deleted file mode 100644
index bae60eb..0000000
--- a/src/http/errors/VariantAlsoNegotiates.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import { BaseHTTPError } from './base';
-
-export default class VariantAlsoNegotiates extends BaseHTTPError {
- statusCode = 506;
-
- title = 'Variant Also Negotiates';
-
- constructor(detail: string = '') {
- super(detail);
- }
-}
diff --git a/src/http/errors/base.ts b/src/http/errors/base.ts
deleted file mode 100644
index 1272b1e..0000000
--- a/src/http/errors/base.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface IHTTPError extends Error {
- statusCode: number;
-}
-
-export interface IHTTPErrorDescription extends IHTTPError {
- type?: string;
- title: string;
- detail?: string;
- instance?: string;
-}
-
-export function isHTTPError(error: unknown): error is IHTTPError {
- if (!error) {
- return false;
- }
- return Number.isInteger((error as IHTTPError).statusCode);
-}
-
-export function isHTTPIssue(error: unknown): error is IHTTPErrorDescription {
- if (!error) {
- return false;
- }
- return (error as IHTTPErrorDescription).title !== undefined && isHTTPError(error);
-}
-
-export class BaseHTTPError extends Error implements IHTTPError {
- public type?: string;
-
- public title: string = 'Internal Server Error';
-
- public detail?: string;
-
- public instance?: string;
-
- public statusCode: number = 500;
-
- constructor(detail: string = '') {
- super(detail || 'An Unknown HTTP Error Occurred');
- this.detail = detail;
- this.stack = (new Error()).stack;
- }
-}
-
-export function isClientError(error: Error): boolean {
- return isHTTPError(error);
-}
-
-export function isServerError(e: Error): boolean {
- return isHTTPError(e) && e.statusCode >= 500 && e.statusCode <= 599;
-}
-
-export type AuthenticateChallenge = string | string[];
diff --git a/src/http/errors/index.ts b/src/http/errors/index.ts
deleted file mode 100644
index f815b07..0000000
--- a/src/http/errors/index.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import BadRequest from './BadRequest';
-import Unauthorized from './Unauthorized';
-import PaymentRequired from './PaymentRequired';
-import Forbidden from './Forbidden';
-import NotFound from './NotFound';
-import MethodNotAllowed from './MethodNotAllowed';
-import NotAcceptable from './NotAcceptable';
-import ProxyAuthenticationRequired from './ProxyAuthenticationRequired';
-import RequestTimeout from './RequestTimeout';
-import Conflict from './Conflict';
-import Gone from './Gone';
-import LengthRequired from './LengthRequired';
-import PreconditionFailed from './PreconditionFailed';
-import PayloadTooLarge from './PayloadTooLarge';
-import UriTooLong from './UriTooLong';
-import UnsupportedMediaType from './UnsupportedMediaType';
-import RangeNotSatisfiable from './RangeNotSatisfiable';
-import ExpectationFailed from './ExpectationFailed';
-import MisdirectedRequest from './MisdirectedRequest';
-import UnprocessableEntity from './UnprocessableEntity';
-import Locked from './Locked';
-import FailedDependency from './FailedDependency';
-import TooEarly from './TooEarly';
-import UpgradeRequired from './UpgradeRequired';
-import PreconditionRequired from './PreconditionRequired';
-import TooManyRequests from './TooManyRequests';
-import RequestHeaderFieldsTooLarge from './RequestHeaderFieldsTooLarge';
-import UnavailableForLegalReasons from './UnavailableForLegalReasons';
-import InternalServerError from './InternalServerError';
-import NotImplemented from './NotImplemented';
-import BadGateway from './BadGateway';
-import ServiceUnavailable from './ServiceUnavailable';
-import GatewayTimeout from './GatewayTimeout';
-import HttpVersionNotSupported from './HttpVersionNotSupported';
-import VariantAlsoNegotiates from './VariantAlsoNegotiates';
-import UnsufficientStorage from './UnsufficientStorage';
-import LoopDetected from './LoopDetected';
-import NotExtended from './NotExtended';
-import NetworkAuthenticationRequired from './NetworkAuthenticationRequired';
-import { BaseHTTPError } from './base';
-
-export {
- BaseHTTPError,
- BadRequest,
- Unauthorized,
- PaymentRequired,
- Forbidden,
- NotFound,
- MethodNotAllowed,
- NotAcceptable,
- ProxyAuthenticationRequired,
- RequestTimeout,
- Conflict,
- Gone,
- LengthRequired,
- PreconditionFailed,
- PayloadTooLarge,
- UriTooLong,
- UnsupportedMediaType,
- RangeNotSatisfiable,
- ExpectationFailed,
- MisdirectedRequest,
- UnprocessableEntity,
- Locked,
- FailedDependency,
- TooEarly,
- UpgradeRequired,
- PreconditionRequired,
- TooManyRequests,
- RequestHeaderFieldsTooLarge,
- UnavailableForLegalReasons,
- InternalServerError,
- NotImplemented,
- BadGateway,
- ServiceUnavailable,
- GatewayTimeout,
- HttpVersionNotSupported,
- VariantAlsoNegotiates,
- UnsufficientStorage,
- LoopDetected,
- NotExtended,
- NetworkAuthenticationRequired,
-};
diff --git a/src/http/handlers/handler-chain.ts b/src/http/handlers/handler-chain.ts
new file mode 100644
index 0000000..24f5a5e
--- /dev/null
+++ b/src/http/handlers/handler-chain.ts
@@ -0,0 +1,24 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { Request } from '../transport/request';
+import { HttpResponse, RequestHandler } from '../types';
+
+export class RequestHandlerChain {
+ private readonly handlers: RequestHandler[] = [];
+
+ addHandler(handler: RequestHandler): void {
+ if (this.handlers.length > 0) {
+ const previousHandler = this.handlers[this.handlers.length - 1];
+ previousHandler.next = handler;
+ }
+ this.handlers.push(handler);
+ }
+
+ async callChain(request: Request): Promise> {
+ if (!this.handlers.length) {
+ throw new Error('No handlers added to the chain');
+ }
+
+ return this.handlers[0].handle(request);
+ }
+}
diff --git a/src/http/handlers/hook-handler.ts b/src/http/handlers/hook-handler.ts
new file mode 100644
index 0000000..8d02d62
--- /dev/null
+++ b/src/http/handlers/hook-handler.ts
@@ -0,0 +1,47 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { Request } from '../transport/request';
+import { HttpResponse, RequestHandler } from '../types';
+import { HttpError } from '../error';
+import { Hook } from '../hooks/hook';
+
+export class HookHandler implements RequestHandler {
+ next?: RequestHandler;
+
+ constructor(private readonly hook: Hook) {}
+
+ async handle(request: Request): Promise> {
+ if (!this.next) {
+ throw new Error('No next handler set in hook handler.');
+ }
+
+ const hookParams = this.getHookParams(request);
+
+ const nextRequest = await this.beforeRequest(request, hookParams);
+
+ const response = await this.next.handle(nextRequest);
+
+ if (response.metadata.status < 400) {
+ return await this.hook.afterResponse(request.toHookRequest(), response, hookParams);
+ }
+
+ const error = await this.hook.onError(request.toHookRequest(), response, hookParams);
+
+ throw new HttpError(error.metadata, error.error);
+ }
+
+ private async beforeRequest(request: Request, hookParams: Map): Promise> {
+ const hookRequest = request.toHookRequest();
+
+ const newRequest = await this.hook.beforeRequest(hookRequest, hookParams);
+
+ request.updateFromHookRequest(newRequest);
+
+ return request;
+ }
+
+ getHookParams(request: Request): Map {
+ const hookParams: Map = new Map();
+ return hookParams;
+ }
+}
diff --git a/src/http/handlers/request-validation-handler.ts b/src/http/handlers/request-validation-handler.ts
new file mode 100644
index 0000000..f9e078b
--- /dev/null
+++ b/src/http/handlers/request-validation-handler.ts
@@ -0,0 +1,74 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { Request } from '../transport/request';
+import { ContentType, HttpResponse, RequestHandler } from '../types';
+import { HttpError } from '../error';
+
+export class RequestValidationHandler implements RequestHandler {
+ next?: RequestHandler;
+
+ async handle(request: Request): Promise> {
+ if (!this.next) {
+ throw new Error('No next handler set in ContentTypeHandler.');
+ }
+
+ if (request.requestContentType === ContentType.Json) {
+ request.body = JSON.stringify(request.requestSchema?.parse(request.body));
+ } else if (
+ request.requestContentType === ContentType.Xml ||
+ request.requestContentType === ContentType.Binary ||
+ request.requestContentType === ContentType.Text
+ ) {
+ request.body = request.body;
+ } else if (request.requestContentType === ContentType.FormUrlEncoded) {
+ request.body = this.toFormUrlEncoded(request.body);
+ } else if (request.requestContentType === ContentType.MultipartFormData) {
+ request.body = this.toFormData(request.body);
+ } else {
+ request.body = JSON.stringify(request.requestSchema?.parse(request.body));
+ }
+
+ return await this.next.handle(request);
+ }
+
+ toFormUrlEncoded(body: BodyInit | undefined): string {
+ if (body === undefined) {
+ return '';
+ }
+
+ if (typeof body === 'string') {
+ return body;
+ }
+
+ if (body instanceof URLSearchParams) {
+ return body.toString();
+ }
+
+ if (body instanceof FormData) {
+ const params = new URLSearchParams();
+ body.forEach((value, key) => {
+ params.append(key, value.toString());
+ });
+ return params.toString();
+ }
+
+ return '';
+ }
+
+ toFormData(body: Record): FormData | undefined {
+ const formData = new FormData();
+
+ Object.keys(body).forEach((key: any) => {
+ const value: any = body[key];
+ if (Array.isArray(value)) {
+ value.forEach((v, i) => formData.append(`${key}[${i}]`, v));
+ } else if (value instanceof ArrayBuffer) {
+ formData.append(key, new Blob([value]));
+ } else {
+ formData.append(key, value);
+ }
+ });
+
+ return formData;
+ }
+}
diff --git a/src/http/handlers/response-validation-handler.ts b/src/http/handlers/response-validation-handler.ts
new file mode 100644
index 0000000..7c95658
--- /dev/null
+++ b/src/http/handlers/response-validation-handler.ts
@@ -0,0 +1,108 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { Request } from '../transport/request';
+import { ZodUndefined } from 'zod';
+import { ContentType, HttpResponse, RequestHandler } from '../types';
+import { HttpError } from '../error';
+
+export class ResponseValidationHandler implements RequestHandler {
+ next?: RequestHandler;
+
+ async handle(request: Request): Promise> {
+ const response = await this.next!.handle(request);
+
+ if (!this.hasContent(request, response)) {
+ return response;
+ }
+
+ if (request.responseContentType === ContentType.Json) {
+ const decodedBody = new TextDecoder().decode(response.raw);
+ const json = JSON.parse(decodedBody);
+ return {
+ ...response,
+ data: this.validate(request, json),
+ };
+ } else if (
+ request.responseContentType === ContentType.Binary ||
+ request.responseContentType === ContentType.Image
+ ) {
+ return {
+ ...response,
+ data: this.validate(request, response.raw),
+ };
+ } else if (request.responseContentType === ContentType.Text || request.responseContentType === ContentType.Xml) {
+ const text = new TextDecoder().decode(response.raw);
+ return {
+ ...response,
+ data: this.validate(request, text),
+ };
+ } else if (request.responseContentType === ContentType.FormUrlEncoded) {
+ const urlEncoded = this.fromUrlEncoded(new TextDecoder().decode(response.raw));
+ return {
+ ...response,
+ data: this.validate(request, urlEncoded),
+ };
+ } else if (request.responseContentType === ContentType.MultipartFormData) {
+ const formData = this.fromFormData(response.raw);
+ return {
+ ...response,
+ data: this.validate(request, formData),
+ };
+ } else {
+ const decodedBody = new TextDecoder().decode(response.raw);
+ const json = JSON.parse(decodedBody);
+ return {
+ ...response,
+ data: this.validate(request, json),
+ };
+ }
+ }
+
+ private validate(request: Request, data: any): T {
+ if (request.validation?.responseValidation) {
+ return request.responseSchema.parse(data);
+ }
+ return data;
+ }
+
+ private hasContent(request: Request, response: HttpResponse): boolean {
+ return (
+ !!request.responseSchema && !(request.responseSchema instanceof ZodUndefined) && response.metadata.status !== 204
+ );
+ }
+
+ private fromUrlEncoded(urlEncodedData: string): object {
+ const pairs = urlEncodedData.split('&');
+ const result: Record = {};
+
+ pairs.forEach((pair) => {
+ const [key, value] = pair.split('=');
+ if (key && value !== undefined) {
+ result[decodeURIComponent(key)] = decodeURIComponent(value);
+ }
+ });
+
+ return result;
+ }
+
+ private fromFormData(arrayBuffer: ArrayBuffer): Record {
+ const decoder = new TextDecoder();
+ const text = decoder.decode(arrayBuffer);
+
+ const boundary = text.split('\r\n')[0];
+ const parts = text.split(boundary).slice(1, -1);
+
+ const formDataObj: Record = {};
+
+ parts.forEach((part) => {
+ const [header, value] = part.split('\r\n\r\n');
+ const nameMatch = header.match(/name="([^"]+)"/);
+ if (nameMatch) {
+ const name = nameMatch[1].trim();
+ formDataObj[name] = value?.trim() || '';
+ }
+ });
+
+ return formDataObj;
+ }
+}
diff --git a/src/http/handlers/retry-handler.ts b/src/http/handlers/retry-handler.ts
new file mode 100644
index 0000000..ae29aef
--- /dev/null
+++ b/src/http/handlers/retry-handler.ts
@@ -0,0 +1,42 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { Request } from '../transport/request';
+import { HttpResponse, RequestHandler } from '../types';
+import { HttpError } from '../error';
+
+export class RetryHandler implements RequestHandler {
+ next?: RequestHandler;
+
+ async handle(request: Request): Promise> {
+ if (!this.next) {
+ throw new Error('No next handler set in retry handler.');
+ }
+
+ for (let attempt = 1; attempt <= request.retry.attempts; attempt++) {
+ try {
+ return await this.next.handle(request);
+ } catch (error: any) {
+ if (!this.shouldRetry(error) || attempt === request.retry.attempts) {
+ throw error;
+ }
+ await this.delay(request.retry.delayMs);
+ }
+ }
+
+ throw new Error('Error retrying request.');
+ }
+
+ private shouldRetry(error: Error): boolean {
+ return error instanceof HttpError && (error.metadata.status >= 500 || error.metadata.status === 408);
+ }
+
+ private delay(delayMs: number | undefined): Promise {
+ if (!delayMs) {
+ return Promise.resolve();
+ }
+
+ return new Promise((resolve, reject) => {
+ setTimeout(() => resolve(), delayMs);
+ });
+ }
+}
diff --git a/src/http/handlers/terminating-handler.ts b/src/http/handlers/terminating-handler.ts
new file mode 100644
index 0000000..f443ddd
--- /dev/null
+++ b/src/http/handlers/terminating-handler.ts
@@ -0,0 +1,40 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { HttpError } from '../error';
+import { Request } from '../transport/request';
+import { HttpResponse, RequestHandler } from '../types';
+
+export class TerminatingHandler implements RequestHandler {
+ async handle(request: Request): Promise> {
+ const { url, requestInit } = request.getFetchArgs();
+ const response = await fetch(url, requestInit);
+
+ const metadata = {
+ status: response.status,
+ statusText: response.statusText,
+ headers: this.getHeaders(response),
+ };
+
+ if (metadata.status >= 400) {
+ throw new HttpError(metadata);
+ }
+
+ return {
+ metadata,
+ raw: await response.clone().arrayBuffer(),
+ };
+ }
+
+ private getHeaders(response: Response): Record {
+ const headers: Record = {};
+ response.headers.forEach((value: string, key: string) => {
+ headers[key] = value;
+ });
+
+ return headers;
+ }
+
+ private isErrorResponse(response: HttpResponse): boolean {
+ return response.metadata.status >= 400;
+ }
+}
diff --git a/src/http/hooks/custom-hook.ts b/src/http/hooks/custom-hook.ts
new file mode 100644
index 0000000..d74ebc8
--- /dev/null
+++ b/src/http/hooks/custom-hook.ts
@@ -0,0 +1,34 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { HttpMetadata } from '../types';
+import { Hook } from './hook';
+import { HttpRequest, HttpResponse, HttpError } from './hook';
+
+export class CustomHook implements Hook {
+ public async beforeRequest(request: HttpRequest, params: Map): Promise {
+ return request;
+ }
+
+ public async afterResponse(
+ request: HttpRequest,
+ response: HttpResponse,
+ params: Map,
+ ): Promise> {
+ return response;
+ }
+
+ public async onError(
+ request: HttpRequest,
+ response: HttpResponse,
+ params: Map,
+ ): Promise {
+ return new CustomHttpError('a custom error message', response.metadata);
+ }
+}
+
+class CustomHttpError implements HttpError {
+ constructor(
+ public error: string,
+ public metadata: HttpMetadata,
+ ) {}
+}
diff --git a/src/http/hooks/hook.ts b/src/http/hooks/hook.ts
new file mode 100644
index 0000000..c9fa712
--- /dev/null
+++ b/src/http/hooks/hook.ts
@@ -0,0 +1,42 @@
+// This file was generated by liblab | https://liblab.com/
+
+type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
+
+export interface HttpRequest {
+ baseUrl: string;
+ method: HttpMethod;
+ path: string;
+ headers: Map;
+ body?: BodyInit;
+ abortSignal?: AbortSignal;
+ queryParams: Map;
+}
+
+interface HttpMetadata {
+ status: number;
+ statusText: string;
+ headers: Record;
+}
+
+export interface HttpResponse {
+ data?: T;
+ metadata: HttpMetadata;
+ raw: ArrayBuffer;
+}
+
+export interface HttpError {
+ error: string;
+ metadata: HttpMetadata;
+}
+
+export interface Hook {
+ beforeRequest(request: HttpRequest, params: Map): Promise;
+
+ afterResponse(
+ request: HttpRequest,
+ response: HttpResponse,
+ params: Map,
+ ): Promise>;
+
+ onError(request: HttpRequest, response: HttpResponse, params: Map): Promise;
+}
diff --git a/src/http/httpExceptions.ts b/src/http/httpExceptions.ts
deleted file mode 100644
index cf9291d..0000000
--- a/src/http/httpExceptions.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import {
- BaseHTTPError,
- BadRequest,
- Unauthorized,
- PaymentRequired,
- Forbidden,
- NotFound,
- MethodNotAllowed,
- NotAcceptable,
- ProxyAuthenticationRequired,
- RequestTimeout,
- Conflict,
- Gone,
- LengthRequired,
- PreconditionFailed,
- PayloadTooLarge,
- UriTooLong,
- UnsupportedMediaType,
- RangeNotSatisfiable,
- ExpectationFailed,
- MisdirectedRequest,
- UnprocessableEntity,
- Locked,
- FailedDependency,
- TooEarly,
- UpgradeRequired,
- PreconditionRequired,
- TooManyRequests,
- RequestHeaderFieldsTooLarge,
- UnavailableForLegalReasons,
- InternalServerError,
- NotImplemented,
- BadGateway,
- ServiceUnavailable,
- GatewayTimeout,
- HttpVersionNotSupported,
- VariantAlsoNegotiates,
- UnsufficientStorage,
- LoopDetected,
- NotExtended,
- NetworkAuthenticationRequired,
-} from './errors';
-
-interface HttpResponseWithError {
- status: number;
- headers: any;
- data?: any;
-}
-
-interface NumberToClass {
- [key: number]: any;
-}
-
-const statusCodeToErrorFunction: NumberToClass = {
- 400: BadRequest,
- 401: Unauthorized,
- 402: PaymentRequired,
- 403: Forbidden,
- 404: NotFound,
- 405: MethodNotAllowed,
- 406: NotAcceptable,
- 407: ProxyAuthenticationRequired,
- 408: RequestTimeout,
- 409: Conflict,
- 410: Gone,
- 411: LengthRequired,
- 412: PreconditionFailed,
- 413: PayloadTooLarge,
- 414: UriTooLong,
- 415: UnsupportedMediaType,
- 416: RangeNotSatisfiable,
- 417: ExpectationFailed,
- 421: MisdirectedRequest,
- 422: UnprocessableEntity,
- 423: Locked,
- 424: FailedDependency,
- 425: TooEarly,
- 426: UpgradeRequired,
- 428: PreconditionRequired,
- 429: TooManyRequests,
- 431: RequestHeaderFieldsTooLarge,
- 451: UnavailableForLegalReasons,
- 500: InternalServerError,
- 501: NotImplemented,
- 502: BadGateway,
- 503: ServiceUnavailable,
- 504: GatewayTimeout,
- 505: HttpVersionNotSupported,
- 506: VariantAlsoNegotiates,
- 507: UnsufficientStorage,
- 508: LoopDetected,
- 510: NotExtended,
- 511: NetworkAuthenticationRequired,
-};
-
-/**
- * @summary This function will throw an error.
- *
- * @param {HttpResponseWithError} response - the response from a request, must contain a status and data fields
- * @throws {Error} - an http error
- */
-export default function throwHttpError(response: HttpResponseWithError): never {
- let error: BaseHTTPError = new BaseHTTPError(response.data);
- switch (response.status) {
- case 401:
- error = new Unauthorized(response.data, response.headers['WWW-Authenticate']);
- break;
- case 405:
- // this indicates a bug in the spec if it allows a method that the server rejects
- error = new MethodNotAllowed(response.data, response.headers.allowed);
- break;
- case 407:
- error = new ProxyAuthenticationRequired(
- response.data,
- response.headers['Proxy-Authenticate'],
- );
- break;
- case 413:
- error = new PayloadTooLarge(response.data, response.headers['Retry-After']);
- break;
- case 429:
- error = new TooManyRequests(response.data, response.headers['Retry-After']);
- break;
- case 503:
- error = new ServiceUnavailable(response.data, response.headers['Retry-After']);
- break;
- default:
- if (response.status in statusCodeToErrorFunction) {
- error = new statusCodeToErrorFunction[response.status](response.data);
- } else {
- const error = new BaseHTTPError(response.data);
- error.statusCode = response.status;
- error.title = 'unknown error';
- }
- }
-
- throw error;
-}
diff --git a/src/http/index.ts b/src/http/index.ts
new file mode 100644
index 0000000..8118d30
--- /dev/null
+++ b/src/http/index.ts
@@ -0,0 +1,6 @@
+// This file was generated by liblab | https://liblab.com/
+
+export * from './client';
+export * from './serializer';
+export * from './types';
+export * from './error';
diff --git a/src/http/serializer.ts b/src/http/serializer.ts
new file mode 100644
index 0000000..89d1004
--- /dev/null
+++ b/src/http/serializer.ts
@@ -0,0 +1,185 @@
+// This file was generated by liblab | https://liblab.com/
+
+export enum SerializationStyle {
+ SIMPLE = 'simple',
+ LABEL = 'label',
+ MATRIX = 'matrix',
+ FORM = 'form',
+ SPACE_DELIMITED = 'space_delimited',
+ PIPE_DELIMITED = 'pipe_delimited',
+ DEEP_OBJECT = 'deep_object',
+}
+
+export function serializePath(
+ pathPattern: string,
+ pathArguments: Record,
+ style = SerializationStyle.SIMPLE,
+ explode = false,
+): string {
+ return Object.entries(pathArguments).reduce((acc, [key, value]) => {
+ const replaceValue = getPathReplaceValue(value, key, style, explode);
+ return acc.replace(`{${key}}`, `${replaceValue}`);
+ }, pathPattern);
+}
+
+export function serializeQuery(
+ queryParams?: Record,
+ _style = SerializationStyle.FORM,
+ explode = true,
+): string {
+ if (!queryParams || !Object.entries(queryParams).length) {
+ return '';
+ }
+
+ // only style = form is supported for now
+ const query = Object.entries(queryParams)
+ .map(([key, value]) => {
+ if (Array.isArray(value)) {
+ if (explode) {
+ return value.map((v) => `${key}=${encode(v)}`).join('&');
+ } else {
+ return `${key}=${value.map(encode).join(',')}`;
+ }
+ } else if (isNonNullObject(value)) {
+ if (explode) {
+ return Object.entries(value)
+ .map(([k, v]) => `${k}=${encode(v)}`)
+ .join('&');
+ } else {
+ return `${key}=${Object.entries(value)
+ .map(([k, v]) => `${k},${encode(v)}`)
+ .join(',')}`;
+ }
+ } else if (isPrimitive(value)) {
+ return `${key}=${encode(value)}`;
+ }
+ return '';
+ })
+ .join('&');
+
+ return `?${query}`;
+}
+
+export function serializeHeader(
+ headers?: Record,
+ explode = false,
+): Record | undefined {
+ if (!headers || !Object.entries(headers).length) {
+ return undefined;
+ }
+
+ return Object.entries(headers).reduce((acc, [key, value]) => {
+ if (Array.isArray(value)) {
+ return { ...acc, [key]: value.join(',') };
+ }
+ if (isNonNullObject(value)) {
+ const serializedObject = Object.entries(value)
+ .map(([objectKey, objectValue]) => {
+ return explode ? `${objectKey}=${objectValue}` : `${objectKey},${objectValue}`;
+ })
+ .join(',');
+
+ return { ...acc, [key]: serializedObject };
+ }
+
+ if (isPrimitive(value)) {
+ return { ...acc, [key]: `${value}` };
+ }
+ return acc;
+ }, {});
+}
+
+function getPathReplaceValue(value: T, key: string, style: SerializationStyle, explode: boolean): string {
+ if (Array.isArray(value)) {
+ return serializePathArray(value, key, style, explode);
+ }
+
+ if (isNonNullObject(value)) {
+ return serializePathObject(value, key, style, explode);
+ }
+
+ if (style === SerializationStyle.LABEL) {
+ return `.${encode(`${value}`)}`;
+ }
+
+ if (style === SerializationStyle.MATRIX) {
+ return `;${encode(`${value}`)}`;
+ }
+
+ return encode(`${value}`);
+}
+
+function getPathPrefix(style: SerializationStyle, explode: boolean, key: string): string {
+ if (style === SerializationStyle.LABEL) {
+ return '.';
+ }
+ if (style === SerializationStyle.MATRIX) {
+ return explode ? `;` : `;${key}=`;
+ }
+ return '';
+}
+
+function serializePathObject(
+ value: T,
+ key: string,
+ style: SerializationStyle,
+ explode: boolean,
+): string {
+ const delimiter = getPathDelimiter(style, explode);
+ const serialized = Object.entries(value)
+ .map(([k, v]) => {
+ const joinCharacter = explode ? '=' : delimiter;
+ const sanitized = encode(v);
+ return `${k}${joinCharacter}${sanitized}`;
+ })
+ .join(delimiter);
+
+ const prefix = getPathPrefix(style, explode, key);
+
+ return `${prefix}${serialized}`;
+}
+
+function serializePathArray(
+ array: (string | number | boolean)[],
+ key: string,
+ style: SerializationStyle,
+ explode: boolean,
+): string {
+ const sanitized = array.map(encode);
+ if (style === SerializationStyle.LABEL) {
+ return `.${sanitized.join(explode ? '.' : ',')}`;
+ }
+ if (style === SerializationStyle.MATRIX) {
+ if (explode) {
+ return `;${sanitized.map((sanitizedValue) => `${key}=${sanitizedValue}`).join(';')}`;
+ }
+ return `;${key}=${sanitized.join(',')}`;
+ }
+
+ return sanitized.join(',');
+}
+
+function encode(value: string | number | boolean): string {
+ return encodeURIComponent(value);
+}
+
+function getPathDelimiter(style: SerializationStyle, explode: boolean): string {
+ if (!explode || style === SerializationStyle.SIMPLE) {
+ return ',';
+ }
+ if (style === SerializationStyle.LABEL) {
+ return '.';
+ }
+ if (style === SerializationStyle.MATRIX) {
+ return ';';
+ }
+ return ',';
+}
+
+function isPrimitive(value: unknown): value is string | number | boolean {
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
+}
+
+function isNonNullObject(value: unknown): value is object {
+ return typeof value === 'object' && value !== null;
+}
diff --git a/src/http/transport/request-builder.ts b/src/http/transport/request-builder.ts
new file mode 100644
index 0000000..489d685
--- /dev/null
+++ b/src/http/transport/request-builder.ts
@@ -0,0 +1,147 @@
+// This file was generated by liblab | https://liblab.com/
+
+import z, { ZodType } from 'zod';
+import { Request, CreateRequestParameters } from './request';
+import { ContentType, HttpMethod, SdkConfig, RequestConfig, RetryOptions, ValidationOptions } from '../types';
+import { Environment } from '../environment';
+
+export class RequestBuilder {
+ private params: CreateRequestParameters;
+
+ constructor() {
+ this.params = {
+ baseUrl: Environment.DEFAULT,
+ method: 'GET',
+ path: '',
+ config: {},
+ responseSchema: z.any(),
+ requestSchema: z.any(),
+ requestContentType: ContentType.Json,
+ responseContentType: ContentType.Json,
+ retry: {
+ attempts: 3,
+ delayMs: 150,
+ },
+ validation: {
+ responseValidation: true,
+ },
+ pathParams: new Map(),
+ queryParams: new Map(),
+ headers: new Map(),
+ };
+ }
+
+ setRetryAttempts(sdkConfig?: SdkConfig, requestConfig?: RequestConfig): RequestBuilder {
+ if (requestConfig?.retry?.attempts !== undefined) {
+ this.params.retry.attempts = requestConfig.retry.attempts;
+ } else if (sdkConfig?.retry?.attempts !== undefined) {
+ this.params.retry.attempts = sdkConfig.retry.attempts;
+ }
+
+ return this;
+ }
+
+ setRetryDelayMs(sdkConfig?: SdkConfig, requestConfig?: RequestConfig): RequestBuilder {
+ if (requestConfig?.retry?.delayMs !== undefined) {
+ this.params.retry.delayMs = requestConfig.retry.delayMs;
+ } else if (sdkConfig?.retry?.delayMs !== undefined) {
+ this.params.retry.delayMs = sdkConfig.retry.delayMs;
+ }
+
+ return this;
+ }
+
+ setResponseValidation(sdkConfig: SdkConfig, requestConfig?: RequestConfig): RequestBuilder {
+ if (requestConfig?.validation?.responseValidation !== undefined) {
+ this.params.validation.responseValidation = requestConfig.validation.responseValidation;
+ } else if (sdkConfig?.validation?.responseValidation !== undefined) {
+ this.params.validation.responseValidation = sdkConfig.validation.responseValidation;
+ }
+
+ return this;
+ }
+
+ setBaseUrl(sdkConfig: SdkConfig): RequestBuilder {
+ if (sdkConfig?.baseUrl !== undefined) {
+ this.params.baseUrl = sdkConfig.baseUrl;
+ }
+
+ return this;
+ }
+
+ setMethod(method: HttpMethod): RequestBuilder {
+ this.params.method = method;
+ return this;
+ }
+
+ setPath(path: string): RequestBuilder {
+ this.params.path = path;
+ return this;
+ }
+
+ setConfig(config: SdkConfig): RequestBuilder {
+ this.params.config = config;
+ return this;
+ }
+
+ setRequestContentType(contentType: ContentType): RequestBuilder {
+ this.params.requestContentType = contentType;
+ return this;
+ }
+
+ setResponseContentType(contentType: ContentType): RequestBuilder {
+ this.params.responseContentType = contentType;
+ return this;
+ }
+
+ setRequestSchema(requestSchema: ZodType): RequestBuilder {
+ this.params.requestSchema = requestSchema;
+ return this;
+ }
+
+ setResponseSchema(responseSchema: ZodType): RequestBuilder {
+ this.params.responseSchema = responseSchema;
+ return this;
+ }
+
+ addBody(body?: any): RequestBuilder {
+ if (body !== undefined) {
+ this.params.body = body;
+ }
+ return this;
+ }
+
+ addPathParam(key: string, value: unknown): RequestBuilder {
+ if (value === undefined) {
+ return this;
+ }
+
+ this.params.pathParams.set(key, value);
+
+ return this;
+ }
+
+ addQueryParam(key: string, value: unknown): RequestBuilder {
+ if (value === undefined) {
+ return this;
+ }
+
+ this.params.queryParams.set(key, value);
+
+ return this;
+ }
+
+ addHeaderParam(key: string, value: unknown): RequestBuilder {
+ if (value === undefined) {
+ return this;
+ }
+
+ this.params.headers.set(key, value);
+
+ return this;
+ }
+
+ public build(): Request {
+ return new Request(this.params);
+ }
+}
diff --git a/src/http/transport/request.ts b/src/http/transport/request.ts
new file mode 100644
index 0000000..cc78c9a
--- /dev/null
+++ b/src/http/transport/request.ts
@@ -0,0 +1,180 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { ZodType } from 'zod';
+import { ContentType, HttpMethod, SdkConfig, RetryOptions, RequestConfig, ValidationOptions } from '../types';
+import { serializeHeader, serializePath, serializeQuery } from '../serializer';
+import { HttpRequest } from '../hooks/hook';
+
+export interface CreateRequestParameters {
+ baseUrl: string;
+ method: HttpMethod;
+ body?: any;
+ headers: Map;
+ queryParams: Map;
+ pathParams: Map;
+ path: string;
+ config: SdkConfig;
+ responseSchema: ZodType;
+ requestSchema: ZodType;
+ requestContentType: ContentType;
+ responseContentType: ContentType;
+ validation: ValidationOptions;
+ retry: RetryOptions;
+}
+
+export class Request {
+ public baseUrl: string = '';
+
+ public headers: Map = new Map();
+
+ public queryParams: Map = new Map();
+
+ public pathParams: Map = new Map();
+
+ public body?: any;
+
+ public method: HttpMethod;
+
+ public path: string;
+
+ public config: SdkConfig;
+
+ public responseSchema: ZodType;
+
+ public requestSchema: ZodType;
+
+ public requestContentType: ContentType;
+
+ public responseContentType: ContentType;
+
+ private readonly pathPattern: string;
+
+ public validation: ValidationOptions = {} as any;
+
+ public retry: RetryOptions = {} as any;
+
+ constructor(params: CreateRequestParameters) {
+ this.baseUrl = params.baseUrl;
+ this.method = params.method;
+ this.pathPattern = params.path;
+ this.body = params.body;
+ this.path = this.constructPath();
+ this.config = params.config;
+ this.pathParams = params.pathParams;
+ this.headers = params.headers;
+ this.queryParams = params.queryParams;
+ this.responseSchema = params.responseSchema;
+ this.requestSchema = params.requestSchema;
+ this.requestContentType = params.requestContentType;
+ this.responseContentType = params.responseContentType;
+ this.retry = params.retry;
+ this.validation = params.validation;
+ }
+
+ addHeaderParam(key: string, value: unknown): void {
+ if (value === undefined) {
+ return;
+ }
+
+ this.headers.set(key, value);
+ }
+
+ addQueryParam(key: string, value: unknown): void {
+ if (value === undefined) {
+ return;
+ }
+
+ this.queryParams.set(key, value);
+ }
+
+ addPathParam(key: string, value: unknown): void {
+ if (value === undefined) {
+ return;
+ }
+
+ this.pathParams.set(key, value);
+ }
+
+ addBody(body: any): void {
+ if (body === undefined) {
+ return;
+ }
+
+ this.body = body;
+ }
+
+ getFetchArgs(): { url: string; requestInit: RequestInit } {
+ const fetchArgs: { url: string; requestInit: RequestInit } = {
+ url: this.constructFullUrl(),
+ requestInit: {
+ method: this.method,
+ body: this.body,
+ },
+ };
+
+ const headersInit = this.constructHeadersInit();
+ if (!!headersInit) {
+ fetchArgs.requestInit['headers'] = headersInit;
+ }
+
+ if (this.config.timeout !== undefined) {
+ fetchArgs.requestInit = {
+ ...fetchArgs.requestInit,
+ signal: AbortSignal.timeout(this.config.timeout),
+ };
+ }
+
+ return fetchArgs;
+ }
+
+ public updateFromHookRequest(hookRequest: HttpRequest) {
+ this.baseUrl = hookRequest.baseUrl;
+ this.method = hookRequest.method;
+ this.path = hookRequest.path;
+ this.body = hookRequest.body;
+ this.headers = hookRequest.headers;
+ this.queryParams = hookRequest.queryParams;
+ }
+
+ public toHookRequest(): HttpRequest {
+ return {
+ baseUrl: this.baseUrl,
+ method: this.method,
+ path: this.path,
+ headers: this.headers,
+ body: this.body,
+ queryParams: this.queryParams,
+ };
+ }
+
+ private constructFullUrl(): string {
+ const queryString = this.constructQueryString();
+ return `${this.baseUrl}${this.constructPath()}${queryString}`;
+ }
+
+ private constructPath(): string {
+ const pathParamsRecord: Record = this.constructParamsRecord(this.pathParams);
+ return serializePath(this.pathPattern, pathParamsRecord);
+ }
+
+ private constructHeadersInit(): HeadersInit | undefined {
+ const headerParamsRecord: Record = this.constructParamsRecord(this.headers);
+ if (Object.entries(headerParamsRecord).length === 0) {
+ return undefined;
+ }
+ return serializeHeader(headerParamsRecord);
+ }
+
+ private constructQueryString(): string {
+ const queryParamsRecord: Record = this.constructParamsRecord(this.queryParams);
+ return serializeQuery(queryParamsRecord);
+ }
+
+ private constructParamsRecord(params: Map): Record {
+ const record: Record = {};
+ params.forEach((val, key) => {
+ record[key] = val;
+ });
+ return record;
+ }
+}
diff --git a/src/http/types.ts b/src/http/types.ts
new file mode 100644
index 0000000..5de85ba
--- /dev/null
+++ b/src/http/types.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { ZodType } from 'zod';
+import { Environment } from './environment';
+import { Request } from './transport/request';
+
+export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
+
+export interface SdkConfig {
+ baseUrl?: string;
+ environment?: Environment;
+ timeout?: number;
+ retry?: RetryOptions;
+ validation?: ValidationOptions;
+}
+
+export interface HttpMetadata {
+ status: number;
+ statusText: string;
+ headers: Record;
+}
+
+export interface HttpResponse {
+ data?: T;
+ metadata: HttpMetadata;
+ raw: ArrayBuffer;
+}
+
+export interface RequestHandler {
+ next?: RequestHandler;
+
+ handle(request: Request): Promise>;
+}
+
+export enum ContentType {
+ Json = 'json',
+ Xml = 'xml',
+ Pdf = 'pdf',
+ Image = 'image',
+ File = 'file',
+ Binary = 'binary',
+ FormUrlEncoded = 'form',
+ Text = 'text',
+ MultipartFormData = 'multipartFormData',
+}
+
+export interface Options {
+ responseSchema: ZodType;
+ requestSchema?: ZodType;
+ body?: any;
+ requestContentType?: ContentType;
+ responseContentType?: ContentType;
+ abortSignal?: AbortSignal;
+ queryParams?: Record;
+ retry?: RetryOptions;
+}
+
+export interface RequestConfig {
+ retry?: RetryOptions;
+ validation?: ValidationOptions;
+}
+
+export interface RetryOptions {
+ attempts: number;
+ delayMs?: number;
+}
+
+export interface ValidationOptions {
+ responseValidation?: boolean;
+}
diff --git a/src/index.ts b/src/index.ts
index 7c43de3..c150de7 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,34 +1,39 @@
// This file was generated by liblab | https://liblab.com/
-import { V1V7OlderVersionsService } from './services/v1V7OlderVersions/V1V7OlderVersions';
-import { V9LatestService } from './services/v9Latest/V9Latest';
+import { Environment } from './http/environment';
+import { SdkConfig } from './http/types';
+import { V9Latest_Service } from './services/v9-latest_';
+import { V1V7OlderVersions_Service } from './services/v1-v7-older-versions_';
-export * from './models';
+export class Speechaceapi {
+ public readonly v9Latest_: V9Latest_Service;
-export * as V1V7OlderVersionsModels from './services/v1V7OlderVersions';
-export * as V9LatestModels from './services/v9Latest';
+ public readonly v1V7OlderVersions_: V1V7OlderVersions_Service;
-export * from './http/errors';
+ constructor(public config: SdkConfig) {
+ const baseUrl = config.environment || config.baseUrl || Environment.DEFAULT;
+ this.config = {
+ ...config,
+ baseUrl,
+ };
+ this.v9Latest_ = new V9Latest_Service(this.config);
-/**
- * [Speechace](https://www.speechace.com) is a Speech Recognition API for fluency and pronunciation assessment. Our patented technology is unique in its ability to score a learner's speech and pinpoint individual syllable and phoneme level mistakes in a user's pronunciation in real time.
- */
-export class Speechaceapi {
- public v1V7OlderVersions: V1V7OlderVersionsService;
- public v9Latest: V9LatestService;
+ this.v1V7OlderVersions_ = new V1V7OlderVersions_Service(this.config);
+ }
+
+ set baseUrl(baseUrl: string) {
+ this.v9Latest_.baseUrl = baseUrl;
+ this.v1V7OlderVersions_.baseUrl = baseUrl;
+ }
- constructor() {
- this.v1V7OlderVersions = new V1V7OlderVersionsService();
- this.v9Latest = new V9LatestService();
+ set environment(environment: Environment) {
+ this.v9Latest_.baseUrl = environment;
+ this.v1V7OlderVersions_.baseUrl = environment;
}
- /**
- * Sets the baseUrl that the SDK will use for its requests.
- * @param {string} url
- */
- setBaseUrl(url: string): void {
- this.v1V7OlderVersions.setBaseUrl(url);
- this.v9Latest.setBaseUrl(url);
+ set timeout(timeout: number) {
+ this.v9Latest_.timeout = timeout;
+ this.v1V7OlderVersions_.timeout = timeout;
}
}
diff --git a/src/models.ts b/src/models.ts
deleted file mode 100644
index c37c6e7..0000000
--- a/src/models.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export type { AssessRelevance1Request } from './services/v1V7OlderVersions/models/AssessRelevance1Request';
-export type { AssessRelevance1Response } from './services/v1V7OlderVersions/models/AssessRelevance1Response';
-export type { GetGrammarVocabCoherenceFeedbackMetricsRequest } from './services/v9Latest/models/GetGrammarVocabCoherenceFeedbackMetricsRequest';
-export type { GetGrammarVocabCoherenceFeedbackMetricsResponse } from './services/v9Latest/models/GetGrammarVocabCoherenceFeedbackMetricsResponse';
-export type { PteAnswerQuestionRequest } from './services/v9Latest/models/PteAnswerQuestionRequest';
-export type { PteAnswerQuestionResponse } from './services/v9Latest/models/PteAnswerQuestionResponse';
-export type { ScoreAPhonemeList1Request } from './services/v1V7OlderVersions/models/ScoreAPhonemeList1Request';
-export type { ScoreAPhonemeList1Response } from './services/v1V7OlderVersions/models/ScoreAPhonemeList1Response';
-export type { ScoreAPhonemeListRequest } from './services/v9Latest/models/ScoreAPhonemeListRequest';
-export type { ScoreAPhonemeListResponse } from './services/v9Latest/models/ScoreAPhonemeListResponse';
-export type { ScoreFluencySpanishRequest } from './services/v9Latest/models/ScoreFluencySpanishRequest';
-export type { ScoreFluencySpanishResponse } from './services/v9Latest/models/ScoreFluencySpanishResponse';
-export type { ScoreVocabularyGrammarRequest } from './services/v1V7OlderVersions/models/ScoreVocabularyGrammarRequest';
-export type { ScoreVocabularyGrammarResponse } from './services/v1V7OlderVersions/models/ScoreVocabularyGrammarResponse';
-export type { ValidateText1Request } from './services/v1V7OlderVersions/models/ValidateText1Request';
-export type { ValidateText1Response } from './services/v1V7OlderVersions/models/ValidateText1Response';
-export type { ValidateTextRequest } from './services/v9Latest/models/ValidateTextRequest';
-export type { ValidateTextResponse } from './services/v9Latest/models/ValidateTextResponse';
diff --git a/src/services/README.md b/src/services/README.md
deleted file mode 100644
index f4e86b8..0000000
--- a/src/services/README.md
+++ /dev/null
@@ -1,428 +0,0 @@
-# Speechaceapi Services
-
-A list of all services and services methods.
-
-- Services
-
- - [V9Latest](#v9latest)
-
- - [V1V7OlderVersions](#v1v7olderversions)
-
-- [All Methods](#all-methods)
-
-## V9Latest
-
-| Method | Description |
-| :---------------------------------------------------------------------------------- | :--------------------------------------------- |
-| [scoreFluencySpanish](#scorefluencyspanish) | Score Fluency - Spanish |
-| [scoreAPhonemeList](#scoreaphonemelist) | Score a Phoneme list |
-| [validateText](#validatetext) | Validate Text |
-| [pteAnswerQuestion](#pteanswerquestion) | PTE Answer Question |
-| [getGrammarVocabCoherenceFeedbackMetrics](#getgrammarvocabcoherencefeedbackmetrics) | Get Grammar, Vocab, Coherence feedback metrics |
-
-## V1V7OlderVersions
-
-| Method | Description |
-| :------------------------------------------------ | :------------------------- |
-| [scoreVocabularyGrammar](#scorevocabularygrammar) | Score Vocabulary & Grammar |
-| [scoreAPhonemeList1](#scoreaphonemelist1) | Score a Phoneme list |
-| [validateText1](#validatetext1) | Validate Text |
-| [assessRelevance1](#assessrelevance1) | Assess Relevance |
-
-## All Methods
-
-### **scoreFluencySpanish**
-
-Score Fluency - Spanish
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/text/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------ | :----- | :------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| dialect | string | The dialect to use for scoring. Supported values are: en-us, en-gb, fr-fr, fr-ca |
-
-**Return Type**
-
-ScoreFluencySpanishResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.scoreFluencySpanish(input, {
- key: '{{speechace_prokey}}',
- dialect: 'es-es',
- });
- console.log(result);
-})();
-
-```
-
-### **scoreAPhonemeList**
-
-Score a Phoneme list
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/phone_list/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------ | :----- | :-------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| userId | string | Optional: A unique anonymized identifier for the end-user who spoke the audio. |
-| dialect | string | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
-
-**Return Type**
-
-ScoreAPhonemeListResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.scoreAPhonemeList(input, {
- key: '{{speechacekey}}',
- userId: 'XYZ-ABC-99001',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **validateText**
-
-Validate Text
-
-- HTTP Method: POST
-- Endpoint: /api/validating/text/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------ | :----- | :------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| text | string | A sentence or sequence of words to validate. |
-| dialect | string | The dialect to use for validation. Default is "en-us". Supported values are "en-us" (US English) and "en-gb" (UK English). |
-
-**Return Type**
-
-ValidateTextResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.validateText(input, {
- key: '{{speechacekey}}',
- text: '"Validate these words existeee."',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **pteAnswerQuestion**
-
-PTE Answer Question
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/task/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------- | :----- | :---------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace |
-| taskType | string | The task_type to score. Supported types are: describe-image, retell-lecture, answer-question. |
-| dialect | string | The dialect to use for scoring. Supported values are: en-us, en-gb, fr-fr, fr-ca, es-es, es-mx. |
-
-**Return Type**
-
-PteAnswerQuestionResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.pteAnswerQuestion(input, {
- key: '{{speechace_premiumkey}}',
- taskType: 'answer-question',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **getGrammarVocabCoherenceFeedbackMetrics**
-
-Get Grammar, Vocab, Coherence feedback metrics
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/speech/v9/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------ | :----- | :------------------------------------------------------------------------------------------------------------ |
-| key | string | API key issued by Speechace. |
-| userId | string | A unique anonymized identifier for the end-user who spoke the audio. |
-| dialect | string | Optional: The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
-
-**Return Type**
-
-GetGrammarVocabCoherenceFeedbackMetricsResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v9Latest.getGrammarVocabCoherenceFeedbackMetrics(input, {
- key: '{{speechace_premiumkey}}',
- userId: 'XYZ-ABC-99001',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **scoreVocabularyGrammar**
-
-Score Vocabulary & Grammar
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/text/v0.5/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------ | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| userId | string | A unique anonymized identifier for the end-user who spoke the audio. \n\nStructure this field to include as much info as possible to aid in reporting and analytics.\n\nFor example: **user_id=XYZ-ABC-99001** where:\n \n_ XYZ is an id for your Product or App\n_ ABC is an id for the customer/site/account\n\* 99001 is an id for the end-user\n\nEnsure user_id is unique and anonymized containing **no personally identifiable information**. |
-| dialect | string | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).\n\nen-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?` |
-
-**Return Type**
-
-ScoreVocabularyGrammarResponse
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v1V7OlderVersions.scoreVocabularyGrammar(input, {
- key: '{{speechace_premiumkey}}',
- userId: 'XYZ-ABC-99001',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **scoreAPhonemeList1**
-
-Score a Phoneme list
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/phone_list/v0.5/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------ | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| userId | string | A unique anonymized identifier for the end-user who spoke the audio. \n\nStructure this field to include as much info as possible to aid in reporting and analytics.\n\nFor example: **user_id=XYZ-ABC-99001** where:\n \n_ XYZ is an id for your Product or App\n_ ABC is an id for the customer/site/account\n\* 99001 is an id for the end-user\n\nEnsure user_id is unique and anonymized containing **no personally identifiable information**. |
-| dialect | string | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).\n\nen-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?` |
-
-**Return Type**
-
-ScoreAPhonemeList1Response
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v1V7OlderVersions.scoreAPhonemeList1(input, {
- key: '{{speechacekey}}',
- userId: 'XYZ-ABC-99001',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **validateText1**
-
-Validate Text
-
-- HTTP Method: POST
-- Endpoint: /api/validating/text/v0.5/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------ | :----- | :------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| text | string | A sentence or sequence of words to validate. |
-| dialect | string | The dialect to use for validation. Default is "en-us". Supported values are "en-us" (US English) and "en-gb" (UK English). |
-
-**Return Type**
-
-ValidateText1Response
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v1V7OlderVersions.validateText1(input, {
- key: '{{speechacekey}}',
- text: '"Validate these words existeee."',
- dialect: 'en-us',
- });
- console.log(result);
-})();
-
-```
-
-### **assessRelevance1**
-
-Assess Relevance
-
-- HTTP Method: POST
-- Endpoint: /api/scoring/speech/v0.5/json
-
-**Required Parameters**
-
-| input | object | Request body. |
-
-**Optional Parameters**
-
-Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
-
-| Name | Type | Description |
-| :------ | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| key | string | API key issued by Speechace. |
-| dialect | string | The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English). |
-| userId | string | A unique anonymized identifier for the end-user who spoke the audio. \nStructure this field to include as much info as possible to aid in reporting and analytics.\nFor example: **user_id=XYZ-ABC-99001** where:\n \n_ XYZ is an id for your Product or App\n_ ABC is an id for the customer/site/account\n\* 99001 is an id for the end-user\nEnsure user_id is unique and anonymized containing **no personally identifiable information**. |
-
-**Return Type**
-
-AssessRelevance1Response
-
-**Example Usage Code Snippet**
-
-```Typescript
-import { Speechaceapi } from 'speechaceapi';
-
-const sdk = new Speechaceapi();
-
-(async () => {
- const input = {};
- const result = await sdk.v1V7OlderVersions.assessRelevance1(input, {
- key: '{{speechace_premiumkey}}',
- dialect: 'en-us',
- userId: 'XYZ-ABC-99001',
- });
- console.log(result);
-})();
-
-```
-
-
diff --git a/src/services/base-service.ts b/src/services/base-service.ts
new file mode 100644
index 0000000..a6f18ec
--- /dev/null
+++ b/src/services/base-service.ts
@@ -0,0 +1,23 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { Environment } from '../http/environment';
+import { HttpClient } from '../http';
+import { SdkConfig } from '../http/types';
+
+export class BaseService {
+ public client: HttpClient = new HttpClient(this.config);
+
+ constructor(public config: SdkConfig) {}
+
+ set baseUrl(baseUrl: string) {
+ this.config.baseUrl = baseUrl;
+ }
+
+ set environment(environment: Environment) {
+ this.config.environment = environment;
+ }
+
+ set timeout(timeout: number) {
+ this.config.timeout = timeout;
+ }
+}
diff --git a/src/services/v1V7OlderVersions/models/ValidateText1Request.ts b/src/services/v1-v7-older-versions_/index.ts
similarity index 59%
rename from src/services/v1V7OlderVersions/models/ValidateText1Request.ts
rename to src/services/v1-v7-older-versions_/index.ts
index e69379a..f4b839d 100644
--- a/src/services/v1V7OlderVersions/models/ValidateText1Request.ts
+++ b/src/services/v1-v7-older-versions_/index.ts
@@ -1,3 +1,3 @@
// This file was generated by liblab | https://liblab.com/
-export interface ValidateText1Request {}
+export * from './v1-v7-older-versions_';
diff --git a/src/services/v1-v7-older-versions_/models/fluency-overall-metrics-3.ts b/src/services/v1-v7-older-versions_/models/fluency-overall-metrics-3.ts
new file mode 100644
index 0000000..d59fc18
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/fluency-overall-metrics-3.ts
@@ -0,0 +1,166 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ overallMetricsIeltsSubscore1,
+ overallMetricsIeltsSubscore1Request,
+ overallMetricsIeltsSubscore1Response,
+} from './overall-metrics-ielts-subscore-1';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const fluencyOverallMetrics3 = z.lazy(() => {
+ return z.object({
+ allPauseCount: z.number().optional(),
+ allPauseDuration: z.number().optional(),
+ allPauseList: z.array(z.array(z.number())).optional(),
+ articulationLength: z.number().optional(),
+ articulationRate: z.number().optional(),
+ correctSyllableCount: z.number().optional(),
+ correctWordCount: z.number().optional(),
+ duration: z.number().optional(),
+ fluencyScore: z.number().optional(),
+ ieltsEstimate: z.number().optional(),
+ ieltsSubscore: overallMetricsIeltsSubscore1.optional(),
+ maxLengthRun: z.number().optional(),
+ meanLengthRun: z.number().optional(),
+ pteEstimate: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speechRate: z.number().optional(),
+ syllableCorrectPerMinute: z.number().optional(),
+ syllableCount: z.number().optional(),
+ wordCorrectPerMinute: z.number().optional(),
+ wordCount: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {FluencyOverallMetrics3} fluencyOverallMetrics3
+ * @property {number}
+ * @property {number}
+ * @property {number[][]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {OverallMetricsIeltsSubscore1}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number[]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type FluencyOverallMetrics3 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencyOverallMetrics3Response = z.lazy(() => {
+ return z
+ .object({
+ all_pause_count: z.number().optional(),
+ all_pause_duration: z.number().optional(),
+ all_pause_list: z.array(z.array(z.number())).optional(),
+ articulation_length: z.number().optional(),
+ articulation_rate: z.number().optional(),
+ correct_syllable_count: z.number().optional(),
+ correct_word_count: z.number().optional(),
+ duration: z.number().optional(),
+ fluency_score: z.number().optional(),
+ ielts_estimate: z.number().optional(),
+ ielts_subscore: overallMetricsIeltsSubscore1Response.optional(),
+ max_length_run: z.number().optional(),
+ mean_length_run: z.number().optional(),
+ pte_estimate: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speech_rate: z.number().optional(),
+ syllable_correct_per_minute: z.number().optional(),
+ syllable_count: z.number().optional(),
+ word_correct_per_minute: z.number().optional(),
+ word_count: z.number().optional(),
+ })
+ .transform((data) => ({
+ allPauseCount: data['all_pause_count'],
+ allPauseDuration: data['all_pause_duration'],
+ allPauseList: data['all_pause_list'],
+ articulationLength: data['articulation_length'],
+ articulationRate: data['articulation_rate'],
+ correctSyllableCount: data['correct_syllable_count'],
+ correctWordCount: data['correct_word_count'],
+ duration: data['duration'],
+ fluencyScore: data['fluency_score'],
+ ieltsEstimate: data['ielts_estimate'],
+ ieltsSubscore: data['ielts_subscore'],
+ maxLengthRun: data['max_length_run'],
+ meanLengthRun: data['mean_length_run'],
+ pteEstimate: data['pte_estimate'],
+ segment: data['segment'],
+ speechRate: data['speech_rate'],
+ syllableCorrectPerMinute: data['syllable_correct_per_minute'],
+ syllableCount: data['syllable_count'],
+ wordCorrectPerMinute: data['word_correct_per_minute'],
+ wordCount: data['word_count'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencyOverallMetrics3Request = z.lazy(() => {
+ return z
+ .object({
+ allPauseCount: z.number().nullish(),
+ allPauseDuration: z.number().nullish(),
+ allPauseList: z.array(z.array(z.number())).nullish(),
+ articulationLength: z.number().nullish(),
+ articulationRate: z.number().nullish(),
+ correctSyllableCount: z.number().nullish(),
+ correctWordCount: z.number().nullish(),
+ duration: z.number().nullish(),
+ fluencyScore: z.number().nullish(),
+ ieltsEstimate: z.number().nullish(),
+ ieltsSubscore: overallMetricsIeltsSubscore1Request.nullish(),
+ maxLengthRun: z.number().nullish(),
+ meanLengthRun: z.number().nullish(),
+ pteEstimate: z.number().nullish(),
+ segment: z.array(z.number()).nullish(),
+ speechRate: z.number().nullish(),
+ syllableCorrectPerMinute: z.number().nullish(),
+ syllableCount: z.number().nullish(),
+ wordCorrectPerMinute: z.number().nullish(),
+ wordCount: z.number().nullish(),
+ })
+ .transform((data) => ({
+ all_pause_count: data['allPauseCount'],
+ all_pause_duration: data['allPauseDuration'],
+ all_pause_list: data['allPauseList'],
+ articulation_length: data['articulationLength'],
+ articulation_rate: data['articulationRate'],
+ correct_syllable_count: data['correctSyllableCount'],
+ correct_word_count: data['correctWordCount'],
+ duration: data['duration'],
+ fluency_score: data['fluencyScore'],
+ ielts_estimate: data['ieltsEstimate'],
+ ielts_subscore: data['ieltsSubscore'],
+ max_length_run: data['maxLengthRun'],
+ mean_length_run: data['meanLengthRun'],
+ pte_estimate: data['pteEstimate'],
+ segment: data['segment'],
+ speech_rate: data['speechRate'],
+ syllable_correct_per_minute: data['syllableCorrectPerMinute'],
+ syllable_count: data['syllableCount'],
+ word_correct_per_minute: data['wordCorrectPerMinute'],
+ word_count: data['wordCount'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/fluency-overall-metrics-4.ts b/src/services/v1-v7-older-versions_/models/fluency-overall-metrics-4.ts
new file mode 100644
index 0000000..a96e1ba
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/fluency-overall-metrics-4.ts
@@ -0,0 +1,166 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ overallMetricsIeltsSubscore2,
+ overallMetricsIeltsSubscore2Request,
+ overallMetricsIeltsSubscore2Response,
+} from './overall-metrics-ielts-subscore-2';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const fluencyOverallMetrics4 = z.lazy(() => {
+ return z.object({
+ allPauseCount: z.number().optional(),
+ allPauseDuration: z.number().optional(),
+ allPauseList: z.array(z.array(z.number())).optional(),
+ articulationLength: z.number().optional(),
+ articulationRate: z.number().optional(),
+ correctSyllableCount: z.number().optional(),
+ correctWordCount: z.number().optional(),
+ duration: z.number().optional(),
+ fluencyScore: z.number().optional(),
+ ieltsEstimate: z.number().optional(),
+ ieltsSubscore: overallMetricsIeltsSubscore2.optional(),
+ maxLengthRun: z.number().optional(),
+ meanLengthRun: z.number().optional(),
+ pteEstimate: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speechRate: z.number().optional(),
+ syllableCorrectPerMinute: z.number().optional(),
+ syllableCount: z.number().optional(),
+ wordCorrectPerMinute: z.number().optional(),
+ wordCount: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {FluencyOverallMetrics4} fluencyOverallMetrics4
+ * @property {number}
+ * @property {number}
+ * @property {number[][]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {OverallMetricsIeltsSubscore2}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number[]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type FluencyOverallMetrics4 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencyOverallMetrics4Response = z.lazy(() => {
+ return z
+ .object({
+ all_pause_count: z.number().optional(),
+ all_pause_duration: z.number().optional(),
+ all_pause_list: z.array(z.array(z.number())).optional(),
+ articulation_length: z.number().optional(),
+ articulation_rate: z.number().optional(),
+ correct_syllable_count: z.number().optional(),
+ correct_word_count: z.number().optional(),
+ duration: z.number().optional(),
+ fluency_score: z.number().optional(),
+ ielts_estimate: z.number().optional(),
+ ielts_subscore: overallMetricsIeltsSubscore2Response.optional(),
+ max_length_run: z.number().optional(),
+ mean_length_run: z.number().optional(),
+ pte_estimate: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speech_rate: z.number().optional(),
+ syllable_correct_per_minute: z.number().optional(),
+ syllable_count: z.number().optional(),
+ word_correct_per_minute: z.number().optional(),
+ word_count: z.number().optional(),
+ })
+ .transform((data) => ({
+ allPauseCount: data['all_pause_count'],
+ allPauseDuration: data['all_pause_duration'],
+ allPauseList: data['all_pause_list'],
+ articulationLength: data['articulation_length'],
+ articulationRate: data['articulation_rate'],
+ correctSyllableCount: data['correct_syllable_count'],
+ correctWordCount: data['correct_word_count'],
+ duration: data['duration'],
+ fluencyScore: data['fluency_score'],
+ ieltsEstimate: data['ielts_estimate'],
+ ieltsSubscore: data['ielts_subscore'],
+ maxLengthRun: data['max_length_run'],
+ meanLengthRun: data['mean_length_run'],
+ pteEstimate: data['pte_estimate'],
+ segment: data['segment'],
+ speechRate: data['speech_rate'],
+ syllableCorrectPerMinute: data['syllable_correct_per_minute'],
+ syllableCount: data['syllable_count'],
+ wordCorrectPerMinute: data['word_correct_per_minute'],
+ wordCount: data['word_count'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencyOverallMetrics4Request = z.lazy(() => {
+ return z
+ .object({
+ allPauseCount: z.number().nullish(),
+ allPauseDuration: z.number().nullish(),
+ allPauseList: z.array(z.array(z.number())).nullish(),
+ articulationLength: z.number().nullish(),
+ articulationRate: z.number().nullish(),
+ correctSyllableCount: z.number().nullish(),
+ correctWordCount: z.number().nullish(),
+ duration: z.number().nullish(),
+ fluencyScore: z.number().nullish(),
+ ieltsEstimate: z.number().nullish(),
+ ieltsSubscore: overallMetricsIeltsSubscore2Request.nullish(),
+ maxLengthRun: z.number().nullish(),
+ meanLengthRun: z.number().nullish(),
+ pteEstimate: z.number().nullish(),
+ segment: z.array(z.number()).nullish(),
+ speechRate: z.number().nullish(),
+ syllableCorrectPerMinute: z.number().nullish(),
+ syllableCount: z.number().nullish(),
+ wordCorrectPerMinute: z.number().nullish(),
+ wordCount: z.number().nullish(),
+ })
+ .transform((data) => ({
+ all_pause_count: data['allPauseCount'],
+ all_pause_duration: data['allPauseDuration'],
+ all_pause_list: data['allPauseList'],
+ articulation_length: data['articulationLength'],
+ articulation_rate: data['articulationRate'],
+ correct_syllable_count: data['correctSyllableCount'],
+ correct_word_count: data['correctWordCount'],
+ duration: data['duration'],
+ fluency_score: data['fluencyScore'],
+ ielts_estimate: data['ieltsEstimate'],
+ ielts_subscore: data['ieltsSubscore'],
+ max_length_run: data['maxLengthRun'],
+ mean_length_run: data['meanLengthRun'],
+ pte_estimate: data['pteEstimate'],
+ segment: data['segment'],
+ speech_rate: data['speechRate'],
+ syllable_correct_per_minute: data['syllableCorrectPerMinute'],
+ syllable_count: data['syllableCount'],
+ word_correct_per_minute: data['wordCorrectPerMinute'],
+ word_count: data['wordCount'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/fluency-segment-metrics-list-3.ts b/src/services/v1-v7-older-versions_/models/fluency-segment-metrics-list-3.ts
new file mode 100644
index 0000000..c3b6299
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/fluency-segment-metrics-list-3.ts
@@ -0,0 +1,149 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const fluencySegmentMetricsList3 = z.lazy(() => {
+ return z.object({
+ allPauseCount: z.number().optional(),
+ allPauseDuration: z.number().optional(),
+ allPauseList: z.array(z.array(z.number())).optional(),
+ articulationLength: z.number().optional(),
+ articulationRate: z.number().optional(),
+ correctSyllableCount: z.number().optional(),
+ correctWordCount: z.number().optional(),
+ duration: z.number().optional(),
+ ieltsEstimate: z.number().optional(),
+ maxLengthRun: z.number().optional(),
+ meanLengthRun: z.number().optional(),
+ pteEstimate: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speechRate: z.number().optional(),
+ syllableCorrectPerMinute: z.number().optional(),
+ syllableCount: z.number().optional(),
+ wordCorrectPerMinute: z.number().optional(),
+ wordCount: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {FluencySegmentMetricsList3} fluencySegmentMetricsList3
+ * @property {number}
+ * @property {number}
+ * @property {number[][]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number[]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type FluencySegmentMetricsList3 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencySegmentMetricsList3Response = z.lazy(() => {
+ return z
+ .object({
+ all_pause_count: z.number().optional(),
+ all_pause_duration: z.number().optional(),
+ all_pause_list: z.array(z.array(z.number())).optional(),
+ articulation_length: z.number().optional(),
+ articulation_rate: z.number().optional(),
+ correct_syllable_count: z.number().optional(),
+ correct_word_count: z.number().optional(),
+ duration: z.number().optional(),
+ ielts_estimate: z.number().optional(),
+ max_length_run: z.number().optional(),
+ mean_length_run: z.number().optional(),
+ pte_estimate: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speech_rate: z.number().optional(),
+ syllable_correct_per_minute: z.number().optional(),
+ syllable_count: z.number().optional(),
+ word_correct_per_minute: z.number().optional(),
+ word_count: z.number().optional(),
+ })
+ .transform((data) => ({
+ allPauseCount: data['all_pause_count'],
+ allPauseDuration: data['all_pause_duration'],
+ allPauseList: data['all_pause_list'],
+ articulationLength: data['articulation_length'],
+ articulationRate: data['articulation_rate'],
+ correctSyllableCount: data['correct_syllable_count'],
+ correctWordCount: data['correct_word_count'],
+ duration: data['duration'],
+ ieltsEstimate: data['ielts_estimate'],
+ maxLengthRun: data['max_length_run'],
+ meanLengthRun: data['mean_length_run'],
+ pteEstimate: data['pte_estimate'],
+ segment: data['segment'],
+ speechRate: data['speech_rate'],
+ syllableCorrectPerMinute: data['syllable_correct_per_minute'],
+ syllableCount: data['syllable_count'],
+ wordCorrectPerMinute: data['word_correct_per_minute'],
+ wordCount: data['word_count'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencySegmentMetricsList3Request = z.lazy(() => {
+ return z
+ .object({
+ allPauseCount: z.number().nullish(),
+ allPauseDuration: z.number().nullish(),
+ allPauseList: z.array(z.array(z.number())).nullish(),
+ articulationLength: z.number().nullish(),
+ articulationRate: z.number().nullish(),
+ correctSyllableCount: z.number().nullish(),
+ correctWordCount: z.number().nullish(),
+ duration: z.number().nullish(),
+ ieltsEstimate: z.number().nullish(),
+ maxLengthRun: z.number().nullish(),
+ meanLengthRun: z.number().nullish(),
+ pteEstimate: z.number().nullish(),
+ segment: z.array(z.number()).nullish(),
+ speechRate: z.number().nullish(),
+ syllableCorrectPerMinute: z.number().nullish(),
+ syllableCount: z.number().nullish(),
+ wordCorrectPerMinute: z.number().nullish(),
+ wordCount: z.number().nullish(),
+ })
+ .transform((data) => ({
+ all_pause_count: data['allPauseCount'],
+ all_pause_duration: data['allPauseDuration'],
+ all_pause_list: data['allPauseList'],
+ articulation_length: data['articulationLength'],
+ articulation_rate: data['articulationRate'],
+ correct_syllable_count: data['correctSyllableCount'],
+ correct_word_count: data['correctWordCount'],
+ duration: data['duration'],
+ ielts_estimate: data['ieltsEstimate'],
+ max_length_run: data['maxLengthRun'],
+ mean_length_run: data['meanLengthRun'],
+ pte_estimate: data['pteEstimate'],
+ segment: data['segment'],
+ speech_rate: data['speechRate'],
+ syllable_correct_per_minute: data['syllableCorrectPerMinute'],
+ syllable_count: data['syllableCount'],
+ word_correct_per_minute: data['wordCorrectPerMinute'],
+ word_count: data['wordCount'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/fluency-segment-metrics-list-4.ts b/src/services/v1-v7-older-versions_/models/fluency-segment-metrics-list-4.ts
new file mode 100644
index 0000000..c103dfe
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/fluency-segment-metrics-list-4.ts
@@ -0,0 +1,166 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ segmentMetricsListIeltsSubscore,
+ segmentMetricsListIeltsSubscoreRequest,
+ segmentMetricsListIeltsSubscoreResponse,
+} from './segment-metrics-list-ielts-subscore';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const fluencySegmentMetricsList4 = z.lazy(() => {
+ return z.object({
+ allPauseCount: z.number().optional(),
+ allPauseDuration: z.number().optional(),
+ allPauseList: z.array(z.array(z.number())).optional(),
+ articulationLength: z.number().optional(),
+ articulationRate: z.number().optional(),
+ correctSyllableCount: z.number().optional(),
+ correctWordCount: z.number().optional(),
+ duration: z.number().optional(),
+ fluencyScore: z.number().optional(),
+ ieltsEstimate: z.number().optional(),
+ ieltsSubscore: segmentMetricsListIeltsSubscore.optional(),
+ maxLengthRun: z.number().optional(),
+ meanLengthRun: z.number().optional(),
+ pteEstimate: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speechRate: z.number().optional(),
+ syllableCorrectPerMinute: z.number().optional(),
+ syllableCount: z.number().optional(),
+ wordCorrectPerMinute: z.number().optional(),
+ wordCount: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {FluencySegmentMetricsList4} fluencySegmentMetricsList4
+ * @property {number}
+ * @property {number}
+ * @property {number[][]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {SegmentMetricsListIeltsSubscore}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number[]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type FluencySegmentMetricsList4 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencySegmentMetricsList4Response = z.lazy(() => {
+ return z
+ .object({
+ all_pause_count: z.number().optional(),
+ all_pause_duration: z.number().optional(),
+ all_pause_list: z.array(z.array(z.number())).optional(),
+ articulation_length: z.number().optional(),
+ articulation_rate: z.number().optional(),
+ correct_syllable_count: z.number().optional(),
+ correct_word_count: z.number().optional(),
+ duration: z.number().optional(),
+ fluency_score: z.number().optional(),
+ ielts_estimate: z.number().optional(),
+ ielts_subscore: segmentMetricsListIeltsSubscoreResponse.optional(),
+ max_length_run: z.number().optional(),
+ mean_length_run: z.number().optional(),
+ pte_estimate: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speech_rate: z.number().optional(),
+ syllable_correct_per_minute: z.number().optional(),
+ syllable_count: z.number().optional(),
+ word_correct_per_minute: z.number().optional(),
+ word_count: z.number().optional(),
+ })
+ .transform((data) => ({
+ allPauseCount: data['all_pause_count'],
+ allPauseDuration: data['all_pause_duration'],
+ allPauseList: data['all_pause_list'],
+ articulationLength: data['articulation_length'],
+ articulationRate: data['articulation_rate'],
+ correctSyllableCount: data['correct_syllable_count'],
+ correctWordCount: data['correct_word_count'],
+ duration: data['duration'],
+ fluencyScore: data['fluency_score'],
+ ieltsEstimate: data['ielts_estimate'],
+ ieltsSubscore: data['ielts_subscore'],
+ maxLengthRun: data['max_length_run'],
+ meanLengthRun: data['mean_length_run'],
+ pteEstimate: data['pte_estimate'],
+ segment: data['segment'],
+ speechRate: data['speech_rate'],
+ syllableCorrectPerMinute: data['syllable_correct_per_minute'],
+ syllableCount: data['syllable_count'],
+ wordCorrectPerMinute: data['word_correct_per_minute'],
+ wordCount: data['word_count'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencySegmentMetricsList4Request = z.lazy(() => {
+ return z
+ .object({
+ allPauseCount: z.number().nullish(),
+ allPauseDuration: z.number().nullish(),
+ allPauseList: z.array(z.array(z.number())).nullish(),
+ articulationLength: z.number().nullish(),
+ articulationRate: z.number().nullish(),
+ correctSyllableCount: z.number().nullish(),
+ correctWordCount: z.number().nullish(),
+ duration: z.number().nullish(),
+ fluencyScore: z.number().nullish(),
+ ieltsEstimate: z.number().nullish(),
+ ieltsSubscore: segmentMetricsListIeltsSubscoreRequest.nullish(),
+ maxLengthRun: z.number().nullish(),
+ meanLengthRun: z.number().nullish(),
+ pteEstimate: z.number().nullish(),
+ segment: z.array(z.number()).nullish(),
+ speechRate: z.number().nullish(),
+ syllableCorrectPerMinute: z.number().nullish(),
+ syllableCount: z.number().nullish(),
+ wordCorrectPerMinute: z.number().nullish(),
+ wordCount: z.number().nullish(),
+ })
+ .transform((data) => ({
+ all_pause_count: data['allPauseCount'],
+ all_pause_duration: data['allPauseDuration'],
+ all_pause_list: data['allPauseList'],
+ articulation_length: data['articulationLength'],
+ articulation_rate: data['articulationRate'],
+ correct_syllable_count: data['correctSyllableCount'],
+ correct_word_count: data['correctWordCount'],
+ duration: data['duration'],
+ fluency_score: data['fluencyScore'],
+ ielts_estimate: data['ieltsEstimate'],
+ ielts_subscore: data['ieltsSubscore'],
+ max_length_run: data['maxLengthRun'],
+ mean_length_run: data['meanLengthRun'],
+ pte_estimate: data['pteEstimate'],
+ segment: data['segment'],
+ speech_rate: data['speechRate'],
+ syllable_correct_per_minute: data['syllableCorrectPerMinute'],
+ syllable_count: data['syllableCount'],
+ word_correct_per_minute: data['wordCorrectPerMinute'],
+ word_count: data['wordCount'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/index.ts b/src/services/v1-v7-older-versions_/models/index.ts
new file mode 100644
index 0000000..aad9ec4
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/index.ts
@@ -0,0 +1,30 @@
+// This file was generated by liblab | https://liblab.com/
+
+export * from './score-a-word-or-sentence1-request';
+export * from './score-a-word-or-sentence1-ok-response';
+export * from './score-a-phoneme-list1-request';
+export * from './score-a-phoneme-list1-ok-response';
+export * from './validate-text1-ok-response';
+export * from './transcribe-score1-request';
+export * from './transcribe-score1-ok-response';
+export * from './score-a-word-or-sentence1-ok-response-text-score';
+export * from './text-score-fluency-2';
+export * from './word-intonation-list';
+export * from './text-score-word-score-list-2';
+export * from './fluency-overall-metrics-3';
+export * from './fluency-segment-metrics-list-3';
+export * from './overall-metrics-ielts-subscore-1';
+export * from './word-score-list-phone-score-list-3';
+export * from './word-score-list-syllable-score-list-3';
+export * from './score-a-phoneme-list1-ok-response-word-score';
+export * from './word-score-phone-score-list-2';
+export * from './transcribe-score1-ok-response-speech-score';
+export * from './speech-score-fluency-2';
+export * from './speech-score-relevance-2';
+export * from './speech-score-word-score-list-2';
+export * from './fluency-overall-metrics-4';
+export * from './fluency-segment-metrics-list-4';
+export * from './overall-metrics-ielts-subscore-2';
+export * from './segment-metrics-list-ielts-subscore';
+export * from './word-score-list-phone-score-list-4';
+export * from './word-score-list-syllable-score-list-4';
diff --git a/src/services/v1-v7-older-versions_/models/overall-metrics-ielts-subscore-1.ts b/src/services/v1-v7-older-versions_/models/overall-metrics-ielts-subscore-1.ts
new file mode 100644
index 0000000..f91e6a9
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/overall-metrics-ielts-subscore-1.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const overallMetricsIeltsSubscore1 = z.lazy(() => {
+ return z.object({
+ grammar: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {OverallMetricsIeltsSubscore1} overallMetricsIeltsSubscore1
+ * @property {number}
+ * @property {number}
+ */
+export type OverallMetricsIeltsSubscore1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const overallMetricsIeltsSubscore1Response = z.lazy(() => {
+ return z
+ .object({
+ grammar: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ grammar: data['grammar'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const overallMetricsIeltsSubscore1Request = z.lazy(() => {
+ return z.object({ grammar: z.number().nullish(), vocab: z.number().nullish() }).transform((data) => ({
+ grammar: data['grammar'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/overall-metrics-ielts-subscore-2.ts b/src/services/v1-v7-older-versions_/models/overall-metrics-ielts-subscore-2.ts
new file mode 100644
index 0000000..6eae8fe
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/overall-metrics-ielts-subscore-2.ts
@@ -0,0 +1,55 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const overallMetricsIeltsSubscore2 = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ grammar: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {OverallMetricsIeltsSubscore2} overallMetricsIeltsSubscore2
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type OverallMetricsIeltsSubscore2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const overallMetricsIeltsSubscore2Response = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ grammar: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ grammar: data['grammar'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const overallMetricsIeltsSubscore2Request = z.lazy(() => {
+ return z
+ .object({ coherence: z.number().nullish(), grammar: z.number().nullish(), vocab: z.number().nullish() })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ grammar: data['grammar'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-ok-response-word-score.ts b/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-ok-response-word-score.ts
new file mode 100644
index 0000000..cb43703
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-ok-response-word-score.ts
@@ -0,0 +1,64 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ wordScorePhoneScoreList2,
+ wordScorePhoneScoreList2Request,
+ wordScorePhoneScoreList2Response,
+} from './word-score-phone-score-list-2';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAPhonemeList1OkResponseWordScore = z.lazy(() => {
+ return z.object({
+ phoneScoreList: z.array(wordScorePhoneScoreList2).optional(),
+ qualityScore: z.number().optional(),
+ word: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAPhonemeList1OkResponseWordScore} scoreAPhonemeList1OkResponseWordScore
+ * @property {WordScorePhoneScoreList2[]}
+ * @property {number}
+ * @property {string}
+ */
+export type ScoreAPhonemeList1OkResponseWordScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeList1OkResponseWordScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ phone_score_list: z.array(wordScorePhoneScoreList2Response).optional(),
+ quality_score: z.number().optional(),
+ word: z.string().optional(),
+ })
+ .transform((data) => ({
+ phoneScoreList: data['phone_score_list'],
+ qualityScore: data['quality_score'],
+ word: data['word'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeList1OkResponseWordScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ phoneScoreList: z.array(wordScorePhoneScoreList2Request).nullish(),
+ qualityScore: z.number().nullish(),
+ word: z.string().nullish(),
+ })
+ .transform((data) => ({
+ phone_score_list: data['phoneScoreList'],
+ quality_score: data['qualityScore'],
+ word: data['word'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-ok-response.ts b/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-ok-response.ts
new file mode 100644
index 0000000..07c51c1
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-ok-response.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ scoreAPhonemeList1OkResponseWordScore,
+ scoreAPhonemeList1OkResponseWordScoreRequest,
+ scoreAPhonemeList1OkResponseWordScoreResponse,
+} from './score-a-phoneme-list1-ok-response-word-score';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAPhonemeList1OkResponse = z.lazy(() => {
+ return z.object({
+ quotaRemaining: z.number().optional(),
+ status: z.string().optional(),
+ version: z.string().optional(),
+ wordScore: scoreAPhonemeList1OkResponseWordScore.optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAPhonemeList1OkResponse} scoreAPhonemeList1OkResponse
+ * @property {number}
+ * @property {string}
+ * @property {string}
+ * @property {ScoreAPhonemeList1OkResponseWordScore}
+ */
+export type ScoreAPhonemeList1OkResponse = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeList1OkResponseResponse = z.lazy(() => {
+ return z
+ .object({
+ quota_remaining: z.number().optional(),
+ status: z.string().optional(),
+ version: z.string().optional(),
+ word_score: scoreAPhonemeList1OkResponseWordScoreResponse.optional(),
+ })
+ .transform((data) => ({
+ quotaRemaining: data['quota_remaining'],
+ status: data['status'],
+ version: data['version'],
+ wordScore: data['word_score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeList1OkResponseRequest = z.lazy(() => {
+ return z
+ .object({
+ quotaRemaining: z.number().nullish(),
+ status: z.string().nullish(),
+ version: z.string().nullish(),
+ wordScore: scoreAPhonemeList1OkResponseWordScoreRequest.nullish(),
+ })
+ .transform((data) => ({
+ quota_remaining: data['quotaRemaining'],
+ status: data['status'],
+ version: data['version'],
+ word_score: data['wordScore'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-request.ts b/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-request.ts
new file mode 100644
index 0000000..7bd42f4
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/score-a-phoneme-list1-request.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAPhonemeList1Request = z.lazy(() => {
+ return z.object({
+ phoneList: z.string().optional(),
+ questionInfo: z.string().optional(),
+ userAudioFile: z.instanceof(ArrayBuffer).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAPhonemeList1Request} scoreAPhonemeList1Request
+ * @property {string} - A phoneme list to score.
+ * @property {string} - A unique identifier for the activity or question this user audio is answering.
+
+Structure this field to include as much info as possible to aid in reporting and analytics.
+
+For example: **question_info='u1/q1'** where:
+
+* u1: means the question belongs to Unit 1 in your content
+* q1: means this is question 1 within the unit
+
+You can add more levels as needed.
+
+Ensure **no personally identifiable information** is passed in this field.
+ * @property {ArrayBuffer} - file with user audio (wav, mp3, m4a, webm, ogg, aiff)
+ */
+export type ScoreAPhonemeList1Request = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeList1RequestResponse = z.lazy(() => {
+ return z
+ .object({
+ phone_list: z.string().optional(),
+ question_info: z.string().optional(),
+ user_audio_file: z.instanceof(ArrayBuffer).optional(),
+ })
+ .transform((data) => ({
+ phoneList: data['phone_list'],
+ questionInfo: data['question_info'],
+ userAudioFile: data['user_audio_file'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeList1RequestRequest = z.lazy(() => {
+ return z
+ .object({
+ phoneList: z.string().nullish(),
+ questionInfo: z.string().nullish(),
+ userAudioFile: z.instanceof(ArrayBuffer).nullish(),
+ })
+ .transform((data) => ({
+ phone_list: data['phoneList'],
+ question_info: data['questionInfo'],
+ user_audio_file: data['userAudioFile'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-ok-response-text-score.ts b/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-ok-response-text-score.ts
new file mode 100644
index 0000000..5eb4006
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-ok-response-text-score.ts
@@ -0,0 +1,84 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import { textScoreFluency2, textScoreFluency2Request, textScoreFluency2Response } from './text-score-fluency-2';
+import { wordIntonationList, wordIntonationListRequest, wordIntonationListResponse } from './word-intonation-list';
+import {
+ textScoreWordScoreList2,
+ textScoreWordScoreList2Request,
+ textScoreWordScoreList2Response,
+} from './text-score-word-score-list-2';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAWordOrSentence1OkResponseTextScore = z.lazy(() => {
+ return z.object({
+ fidelityClass: z.string().optional(),
+ fluency: textScoreFluency2.optional(),
+ qualityScore: z.number().optional(),
+ text: z.string().optional(),
+ wordIntonationList: z.array(wordIntonationList).optional(),
+ wordScoreList: z.array(textScoreWordScoreList2).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAWordOrSentence1OkResponseTextScore} scoreAWordOrSentence1OkResponseTextScore
+ * @property {string}
+ * @property {TextScoreFluency2}
+ * @property {number}
+ * @property {string}
+ * @property {WordIntonationList[]}
+ * @property {TextScoreWordScoreList2[]}
+ */
+export type ScoreAWordOrSentence1OkResponseTextScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentence1OkResponseTextScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ fidelity_class: z.string().optional(),
+ fluency: textScoreFluency2Response.optional(),
+ quality_score: z.number().optional(),
+ text: z.string().optional(),
+ word_intonation_list: z.array(wordIntonationListResponse).optional(),
+ word_score_list: z.array(textScoreWordScoreList2Response).optional(),
+ })
+ .transform((data) => ({
+ fidelityClass: data['fidelity_class'],
+ fluency: data['fluency'],
+ qualityScore: data['quality_score'],
+ text: data['text'],
+ wordIntonationList: data['word_intonation_list'],
+ wordScoreList: data['word_score_list'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentence1OkResponseTextScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ fidelityClass: z.string().nullish(),
+ fluency: textScoreFluency2Request.nullish(),
+ qualityScore: z.number().nullish(),
+ text: z.string().nullish(),
+ wordIntonationList: z.array(wordIntonationListRequest).nullish(),
+ wordScoreList: z.array(textScoreWordScoreList2Request).nullish(),
+ })
+ .transform((data) => ({
+ fidelity_class: data['fidelityClass'],
+ fluency: data['fluency'],
+ quality_score: data['qualityScore'],
+ text: data['text'],
+ word_intonation_list: data['wordIntonationList'],
+ word_score_list: data['wordScoreList'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-ok-response.ts b/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-ok-response.ts
new file mode 100644
index 0000000..514e93c
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-ok-response.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ scoreAWordOrSentence1OkResponseTextScore,
+ scoreAWordOrSentence1OkResponseTextScoreRequest,
+ scoreAWordOrSentence1OkResponseTextScoreResponse,
+} from './score-a-word-or-sentence1-ok-response-text-score';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAWordOrSentence1OkResponse = z.lazy(() => {
+ return z.object({
+ quotaRemaining: z.number().optional(),
+ status: z.string().optional(),
+ textScore: scoreAWordOrSentence1OkResponseTextScore.optional(),
+ version: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAWordOrSentence1OkResponse} scoreAWordOrSentence1OkResponse
+ * @property {number}
+ * @property {string}
+ * @property {ScoreAWordOrSentence1OkResponseTextScore}
+ * @property {string}
+ */
+export type ScoreAWordOrSentence1OkResponse = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentence1OkResponseResponse = z.lazy(() => {
+ return z
+ .object({
+ quota_remaining: z.number().optional(),
+ status: z.string().optional(),
+ text_score: scoreAWordOrSentence1OkResponseTextScoreResponse.optional(),
+ version: z.string().optional(),
+ })
+ .transform((data) => ({
+ quotaRemaining: data['quota_remaining'],
+ status: data['status'],
+ textScore: data['text_score'],
+ version: data['version'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentence1OkResponseRequest = z.lazy(() => {
+ return z
+ .object({
+ quotaRemaining: z.number().nullish(),
+ status: z.string().nullish(),
+ textScore: scoreAWordOrSentence1OkResponseTextScoreRequest.nullish(),
+ version: z.string().nullish(),
+ })
+ .transform((data) => ({
+ quota_remaining: data['quotaRemaining'],
+ status: data['status'],
+ text_score: data['textScore'],
+ version: data['version'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-request.ts b/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-request.ts
new file mode 100644
index 0000000..d28f734
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/score-a-word-or-sentence1-request.ts
@@ -0,0 +1,82 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAWordOrSentence1Request = z.lazy(() => {
+ return z.object({
+ includeFluency: z.string().optional(),
+ includeIeltsSubscore: z.string().optional(),
+ questionInfo: z.string().optional(),
+ text: z.string().optional(),
+ userAudioFile: z.instanceof(ArrayBuffer).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAWordOrSentence1Request} scoreAWordOrSentence1Request
+ * @property {string} - includes fluency scoring for this request. To use this field you must have a Speechace API PRO key.
+ * @property {string} - beta: include IELTS subscores for (Vocabulary, Grammar).
+ * @property {string} - A unique identifier for the activity or question this user audio is answering.
+
+Structure this field to include as much info as possible to aid in reporting and analytics.
+
+For example: **question_info='u1/q1'** where:
+
+* u1: means the question belongs to Unit 1 in your content
+* q1: means this is question 1 within the unit
+
+You can add more levels as needed.
+
+Ensure **no personally identifiable information** is passed in this field.
+ * @property {string} - One or more paragraphs of text to score.
+ * @property {ArrayBuffer} - file with user audio (wav, mp3, m4a, webm, ogg, aiff)
+ */
+export type ScoreAWordOrSentence1Request = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentence1RequestResponse = z.lazy(() => {
+ return z
+ .object({
+ include_fluency: z.string().optional(),
+ include_ielts_subscore: z.string().optional(),
+ question_info: z.string().optional(),
+ text: z.string().optional(),
+ user_audio_file: z.instanceof(ArrayBuffer).optional(),
+ })
+ .transform((data) => ({
+ includeFluency: data['include_fluency'],
+ includeIeltsSubscore: data['include_ielts_subscore'],
+ questionInfo: data['question_info'],
+ text: data['text'],
+ userAudioFile: data['user_audio_file'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentence1RequestRequest = z.lazy(() => {
+ return z
+ .object({
+ includeFluency: z.string().nullish(),
+ includeIeltsSubscore: z.string().nullish(),
+ questionInfo: z.string().nullish(),
+ text: z.string().nullish(),
+ userAudioFile: z.instanceof(ArrayBuffer).nullish(),
+ })
+ .transform((data) => ({
+ include_fluency: data['includeFluency'],
+ include_ielts_subscore: data['includeIeltsSubscore'],
+ question_info: data['questionInfo'],
+ text: data['text'],
+ user_audio_file: data['userAudioFile'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/segment-metrics-list-ielts-subscore.ts b/src/services/v1-v7-older-versions_/models/segment-metrics-list-ielts-subscore.ts
new file mode 100644
index 0000000..48fb0d0
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/segment-metrics-list-ielts-subscore.ts
@@ -0,0 +1,55 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const segmentMetricsListIeltsSubscore = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ grammar: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SegmentMetricsListIeltsSubscore} segmentMetricsListIeltsSubscore
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SegmentMetricsListIeltsSubscore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListIeltsSubscoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ grammar: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ grammar: data['grammar'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListIeltsSubscoreRequest = z.lazy(() => {
+ return z
+ .object({ coherence: z.number().nullish(), grammar: z.number().nullish(), vocab: z.number().nullish() })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ grammar: data['grammar'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/speech-score-fluency-2.ts b/src/services/v1-v7-older-versions_/models/speech-score-fluency-2.ts
new file mode 100644
index 0000000..b27e93e
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/speech-score-fluency-2.ts
@@ -0,0 +1,75 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ fluencyOverallMetrics4,
+ fluencyOverallMetrics4Request,
+ fluencyOverallMetrics4Response,
+} from './fluency-overall-metrics-4';
+import {
+ fluencySegmentMetricsList4,
+ fluencySegmentMetricsList4Request,
+ fluencySegmentMetricsList4Response,
+} from './fluency-segment-metrics-list-4';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreFluency2 = z.lazy(() => {
+ return z.object({
+ fluencyVersion: z.any().optional().nullable(),
+ ieltsSubscoreVersion: z.any().optional().nullable(),
+ overallMetrics: fluencyOverallMetrics4.optional(),
+ segmentMetricsList: z.array(fluencySegmentMetricsList4).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreFluency2} speechScoreFluency2
+ * @property {any}
+ * @property {any}
+ * @property {FluencyOverallMetrics4}
+ * @property {FluencySegmentMetricsList4[]}
+ */
+export type SpeechScoreFluency2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreFluency2Response = z.lazy(() => {
+ return z
+ .object({
+ fluency_version: z.any().optional().nullable(),
+ ielts_subscore_version: z.any().optional().nullable(),
+ overall_metrics: fluencyOverallMetrics4Response.optional(),
+ segment_metrics_list: z.array(fluencySegmentMetricsList4Response).optional(),
+ })
+ .transform((data) => ({
+ fluencyVersion: data['fluency_version'],
+ ieltsSubscoreVersion: data['ielts_subscore_version'],
+ overallMetrics: data['overall_metrics'],
+ segmentMetricsList: data['segment_metrics_list'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreFluency2Request = z.lazy(() => {
+ return z
+ .object({
+ fluencyVersion: z.any().nullish(),
+ ieltsSubscoreVersion: z.any().nullish(),
+ overallMetrics: fluencyOverallMetrics4Request.nullish(),
+ segmentMetricsList: z.array(fluencySegmentMetricsList4Request).nullish(),
+ })
+ .transform((data) => ({
+ fluency_version: data['fluencyVersion'],
+ ielts_subscore_version: data['ieltsSubscoreVersion'],
+ overall_metrics: data['overallMetrics'],
+ segment_metrics_list: data['segmentMetricsList'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/speech-score-relevance-2.ts b/src/services/v1-v7-older-versions_/models/speech-score-relevance-2.ts
new file mode 100644
index 0000000..60766c4
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/speech-score-relevance-2.ts
@@ -0,0 +1,43 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreRelevance2 = z.lazy(() => {
+ return z.object({
+ class: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreRelevance2} speechScoreRelevance2
+ * @property {string}
+ */
+export type SpeechScoreRelevance2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreRelevance2Response = z.lazy(() => {
+ return z
+ .object({
+ class: z.string().optional(),
+ })
+ .transform((data) => ({
+ class: data['class'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreRelevance2Request = z.lazy(() => {
+ return z.object({ class: z.string().nullish() }).transform((data) => ({
+ class: data['class'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/speech-score-word-score-list-2.ts b/src/services/v1-v7-older-versions_/models/speech-score-word-score-list-2.ts
new file mode 100644
index 0000000..502e580
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/speech-score-word-score-list-2.ts
@@ -0,0 +1,81 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ wordScoreListPhoneScoreList4,
+ wordScoreListPhoneScoreList4Request,
+ wordScoreListPhoneScoreList4Response,
+} from './word-score-list-phone-score-list-4';
+import {
+ wordScoreListSyllableScoreList4,
+ wordScoreListSyllableScoreList4Request,
+ wordScoreListSyllableScoreList4Response,
+} from './word-score-list-syllable-score-list-4';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreWordScoreList2 = z.lazy(() => {
+ return z.object({
+ endingPunctuation: z.string().optional(),
+ phoneScoreList: z.array(wordScoreListPhoneScoreList4).optional(),
+ qualityScore: z.number().optional(),
+ syllableScoreList: z.array(wordScoreListSyllableScoreList4).optional(),
+ word: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreWordScoreList2} speechScoreWordScoreList2
+ * @property {string}
+ * @property {WordScoreListPhoneScoreList4[]}
+ * @property {number}
+ * @property {WordScoreListSyllableScoreList4[]}
+ * @property {string}
+ */
+export type SpeechScoreWordScoreList2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreWordScoreList2Response = z.lazy(() => {
+ return z
+ .object({
+ ending_punctuation: z.string().optional(),
+ phone_score_list: z.array(wordScoreListPhoneScoreList4Response).optional(),
+ quality_score: z.number().optional(),
+ syllable_score_list: z.array(wordScoreListSyllableScoreList4Response).optional(),
+ word: z.string().optional(),
+ })
+ .transform((data) => ({
+ endingPunctuation: data['ending_punctuation'],
+ phoneScoreList: data['phone_score_list'],
+ qualityScore: data['quality_score'],
+ syllableScoreList: data['syllable_score_list'],
+ word: data['word'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreWordScoreList2Request = z.lazy(() => {
+ return z
+ .object({
+ endingPunctuation: z.string().nullish(),
+ phoneScoreList: z.array(wordScoreListPhoneScoreList4Request).nullish(),
+ qualityScore: z.number().nullish(),
+ syllableScoreList: z.array(wordScoreListSyllableScoreList4Request).nullish(),
+ word: z.string().nullish(),
+ })
+ .transform((data) => ({
+ ending_punctuation: data['endingPunctuation'],
+ phone_score_list: data['phoneScoreList'],
+ quality_score: data['qualityScore'],
+ syllable_score_list: data['syllableScoreList'],
+ word: data['word'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/text-score-fluency-2.ts b/src/services/v1-v7-older-versions_/models/text-score-fluency-2.ts
new file mode 100644
index 0000000..3583669
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/text-score-fluency-2.ts
@@ -0,0 +1,75 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ fluencyOverallMetrics3,
+ fluencyOverallMetrics3Request,
+ fluencyOverallMetrics3Response,
+} from './fluency-overall-metrics-3';
+import {
+ fluencySegmentMetricsList3,
+ fluencySegmentMetricsList3Request,
+ fluencySegmentMetricsList3Response,
+} from './fluency-segment-metrics-list-3';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScoreFluency2 = z.lazy(() => {
+ return z.object({
+ fluencyVersion: z.any().optional().nullable(),
+ ieltsSubscoreVersion: z.any().optional().nullable(),
+ overallMetrics: fluencyOverallMetrics3.optional(),
+ segmentMetricsList: z.array(fluencySegmentMetricsList3).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScoreFluency2} textScoreFluency2
+ * @property {any}
+ * @property {any}
+ * @property {FluencyOverallMetrics3}
+ * @property {FluencySegmentMetricsList3[]}
+ */
+export type TextScoreFluency2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreFluency2Response = z.lazy(() => {
+ return z
+ .object({
+ fluency_version: z.any().optional().nullable(),
+ ielts_subscore_version: z.any().optional().nullable(),
+ overall_metrics: fluencyOverallMetrics3Response.optional(),
+ segment_metrics_list: z.array(fluencySegmentMetricsList3Response).optional(),
+ })
+ .transform((data) => ({
+ fluencyVersion: data['fluency_version'],
+ ieltsSubscoreVersion: data['ielts_subscore_version'],
+ overallMetrics: data['overall_metrics'],
+ segmentMetricsList: data['segment_metrics_list'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreFluency2Request = z.lazy(() => {
+ return z
+ .object({
+ fluencyVersion: z.any().nullish(),
+ ieltsSubscoreVersion: z.any().nullish(),
+ overallMetrics: fluencyOverallMetrics3Request.nullish(),
+ segmentMetricsList: z.array(fluencySegmentMetricsList3Request).nullish(),
+ })
+ .transform((data) => ({
+ fluency_version: data['fluencyVersion'],
+ ielts_subscore_version: data['ieltsSubscoreVersion'],
+ overall_metrics: data['overallMetrics'],
+ segment_metrics_list: data['segmentMetricsList'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/text-score-word-score-list-2.ts b/src/services/v1-v7-older-versions_/models/text-score-word-score-list-2.ts
new file mode 100644
index 0000000..f3687d0
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/text-score-word-score-list-2.ts
@@ -0,0 +1,75 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ wordScoreListPhoneScoreList3,
+ wordScoreListPhoneScoreList3Request,
+ wordScoreListPhoneScoreList3Response,
+} from './word-score-list-phone-score-list-3';
+import {
+ wordScoreListSyllableScoreList3,
+ wordScoreListSyllableScoreList3Request,
+ wordScoreListSyllableScoreList3Response,
+} from './word-score-list-syllable-score-list-3';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScoreWordScoreList2 = z.lazy(() => {
+ return z.object({
+ phoneScoreList: z.array(wordScoreListPhoneScoreList3).optional(),
+ qualityScore: z.number().optional(),
+ syllableScoreList: z.array(wordScoreListSyllableScoreList3).optional(),
+ word: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScoreWordScoreList2} textScoreWordScoreList2
+ * @property {WordScoreListPhoneScoreList3[]}
+ * @property {number}
+ * @property {WordScoreListSyllableScoreList3[]}
+ * @property {string}
+ */
+export type TextScoreWordScoreList2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreWordScoreList2Response = z.lazy(() => {
+ return z
+ .object({
+ phone_score_list: z.array(wordScoreListPhoneScoreList3Response).optional(),
+ quality_score: z.number().optional(),
+ syllable_score_list: z.array(wordScoreListSyllableScoreList3Response).optional(),
+ word: z.string().optional(),
+ })
+ .transform((data) => ({
+ phoneScoreList: data['phone_score_list'],
+ qualityScore: data['quality_score'],
+ syllableScoreList: data['syllable_score_list'],
+ word: data['word'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreWordScoreList2Request = z.lazy(() => {
+ return z
+ .object({
+ phoneScoreList: z.array(wordScoreListPhoneScoreList3Request).nullish(),
+ qualityScore: z.number().nullish(),
+ syllableScoreList: z.array(wordScoreListSyllableScoreList3Request).nullish(),
+ word: z.string().nullish(),
+ })
+ .transform((data) => ({
+ phone_score_list: data['phoneScoreList'],
+ quality_score: data['qualityScore'],
+ syllable_score_list: data['syllableScoreList'],
+ word: data['word'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/transcribe-score1-ok-response-speech-score.ts b/src/services/v1-v7-older-versions_/models/transcribe-score1-ok-response-speech-score.ts
new file mode 100644
index 0000000..c19c3e5
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/transcribe-score1-ok-response-speech-score.ts
@@ -0,0 +1,88 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import { speechScoreFluency2, speechScoreFluency2Request, speechScoreFluency2Response } from './speech-score-fluency-2';
+import {
+ speechScoreRelevance2,
+ speechScoreRelevance2Request,
+ speechScoreRelevance2Response,
+} from './speech-score-relevance-2';
+import {
+ speechScoreWordScoreList2,
+ speechScoreWordScoreList2Request,
+ speechScoreWordScoreList2Response,
+} from './speech-score-word-score-list-2';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const transcribeScore1OkResponseSpeechScore = z.lazy(() => {
+ return z.object({
+ fidelityClass: z.string().optional(),
+ fluency: speechScoreFluency2.optional(),
+ qualityScore: z.number().optional(),
+ relevance: speechScoreRelevance2.optional(),
+ transcript: z.string().optional(),
+ wordScoreList: z.array(speechScoreWordScoreList2).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TranscribeScore1OkResponseSpeechScore} transcribeScore1OkResponseSpeechScore
+ * @property {string}
+ * @property {SpeechScoreFluency2}
+ * @property {number}
+ * @property {SpeechScoreRelevance2}
+ * @property {string}
+ * @property {SpeechScoreWordScoreList2[]}
+ */
+export type TranscribeScore1OkResponseSpeechScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const transcribeScore1OkResponseSpeechScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ fidelity_class: z.string().optional(),
+ fluency: speechScoreFluency2Response.optional(),
+ quality_score: z.number().optional(),
+ relevance: speechScoreRelevance2Response.optional(),
+ transcript: z.string().optional(),
+ word_score_list: z.array(speechScoreWordScoreList2Response).optional(),
+ })
+ .transform((data) => ({
+ fidelityClass: data['fidelity_class'],
+ fluency: data['fluency'],
+ qualityScore: data['quality_score'],
+ relevance: data['relevance'],
+ transcript: data['transcript'],
+ wordScoreList: data['word_score_list'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const transcribeScore1OkResponseSpeechScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ fidelityClass: z.string().nullish(),
+ fluency: speechScoreFluency2Request.nullish(),
+ qualityScore: z.number().nullish(),
+ relevance: speechScoreRelevance2Request.nullish(),
+ transcript: z.string().nullish(),
+ wordScoreList: z.array(speechScoreWordScoreList2Request).nullish(),
+ })
+ .transform((data) => ({
+ fidelity_class: data['fidelityClass'],
+ fluency: data['fluency'],
+ quality_score: data['qualityScore'],
+ relevance: data['relevance'],
+ transcript: data['transcript'],
+ word_score_list: data['wordScoreList'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/transcribe-score1-ok-response.ts b/src/services/v1-v7-older-versions_/models/transcribe-score1-ok-response.ts
new file mode 100644
index 0000000..945fb74
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/transcribe-score1-ok-response.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ transcribeScore1OkResponseSpeechScore,
+ transcribeScore1OkResponseSpeechScoreRequest,
+ transcribeScore1OkResponseSpeechScoreResponse,
+} from './transcribe-score1-ok-response-speech-score';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const transcribeScore1OkResponse = z.lazy(() => {
+ return z.object({
+ quotaRemaining: z.number().optional(),
+ speechScore: transcribeScore1OkResponseSpeechScore.optional(),
+ status: z.string().optional(),
+ version: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TranscribeScore1OkResponse} transcribeScore1OkResponse
+ * @property {number}
+ * @property {TranscribeScore1OkResponseSpeechScore}
+ * @property {string}
+ * @property {string}
+ */
+export type TranscribeScore1OkResponse = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const transcribeScore1OkResponseResponse = z.lazy(() => {
+ return z
+ .object({
+ quota_remaining: z.number().optional(),
+ speech_score: transcribeScore1OkResponseSpeechScoreResponse.optional(),
+ status: z.string().optional(),
+ version: z.string().optional(),
+ })
+ .transform((data) => ({
+ quotaRemaining: data['quota_remaining'],
+ speechScore: data['speech_score'],
+ status: data['status'],
+ version: data['version'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const transcribeScore1OkResponseRequest = z.lazy(() => {
+ return z
+ .object({
+ quotaRemaining: z.number().nullish(),
+ speechScore: transcribeScore1OkResponseSpeechScoreRequest.nullish(),
+ status: z.string().nullish(),
+ version: z.string().nullish(),
+ })
+ .transform((data) => ({
+ quota_remaining: data['quotaRemaining'],
+ speech_score: data['speechScore'],
+ status: data['status'],
+ version: data['version'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/transcribe-score1-request.ts b/src/services/v1-v7-older-versions_/models/transcribe-score1-request.ts
new file mode 100644
index 0000000..609bd43
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/transcribe-score1-request.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const transcribeScore1Request = z.lazy(() => {
+ return z.object({
+ includeFluency: z.string().optional(),
+ includeIeltsSubscore: z.string().optional(),
+ includeUnknownWords: z.string().optional(),
+ relevanceContext: z.string().optional(),
+ userAudioFile: z.instanceof(ArrayBuffer).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TranscribeScore1Request} transcribeScore1Request
+ * @property {string} - includes fluency scoring for this request. To use this field you must have a Speechace API PRO key.
+ * @property {string} - include IELTS subscores for (Vocabulary, Grammar, Coherence).
+ * @property {string} - automatically identify the phonetic mapping for any unknown words such as names or locations and use that for scoring.
+ * @property {string} - Question Prompt text provided to the user. When this parameter is passed, the relevance of the user audio transcript is evaluated for the given question prompt and a resulting relevance class is returned in .speech_score.relevance.class (TRUE/FALSE). A FALSE relevance class will result in .speech_score.fluency.overall_metrics.ielts_estimate and .speech_score.fluency.overall_metrics.pte_estimate to be set to the lowest possible score.
+ * @property {ArrayBuffer} - file with user audio (wav, mp3, m4a, webm, ogg, aiff)
+ */
+export type TranscribeScore1Request = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const transcribeScore1RequestResponse = z.lazy(() => {
+ return z
+ .object({
+ include_fluency: z.string().optional(),
+ include_ielts_subscore: z.string().optional(),
+ include_unknown_words: z.string().optional(),
+ relevance_context: z.string().optional(),
+ user_audio_file: z.instanceof(ArrayBuffer).optional(),
+ })
+ .transform((data) => ({
+ includeFluency: data['include_fluency'],
+ includeIeltsSubscore: data['include_ielts_subscore'],
+ includeUnknownWords: data['include_unknown_words'],
+ relevanceContext: data['relevance_context'],
+ userAudioFile: data['user_audio_file'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const transcribeScore1RequestRequest = z.lazy(() => {
+ return z
+ .object({
+ includeFluency: z.string().nullish(),
+ includeIeltsSubscore: z.string().nullish(),
+ includeUnknownWords: z.string().nullish(),
+ relevanceContext: z.string().nullish(),
+ userAudioFile: z.instanceof(ArrayBuffer).nullish(),
+ })
+ .transform((data) => ({
+ include_fluency: data['includeFluency'],
+ include_ielts_subscore: data['includeIeltsSubscore'],
+ include_unknown_words: data['includeUnknownWords'],
+ relevance_context: data['relevanceContext'],
+ user_audio_file: data['userAudioFile'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/validate-text1-ok-response.ts b/src/services/v1-v7-older-versions_/models/validate-text1-ok-response.ts
new file mode 100644
index 0000000..0b86d44
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/validate-text1-ok-response.ts
@@ -0,0 +1,55 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const validateText1OkResponse = z.lazy(() => {
+ return z.object({
+ detailMessage: z.string().optional(),
+ shortMessage: z.string().optional(),
+ status: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ValidateText1OkResponse} validateText1OkResponse
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ */
+export type ValidateText1OkResponse = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const validateText1OkResponseResponse = z.lazy(() => {
+ return z
+ .object({
+ detail_message: z.string().optional(),
+ short_message: z.string().optional(),
+ status: z.string().optional(),
+ })
+ .transform((data) => ({
+ detailMessage: data['detail_message'],
+ shortMessage: data['short_message'],
+ status: data['status'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const validateText1OkResponseRequest = z.lazy(() => {
+ return z
+ .object({ detailMessage: z.string().nullish(), shortMessage: z.string().nullish(), status: z.string().nullish() })
+ .transform((data) => ({
+ detail_message: data['detailMessage'],
+ short_message: data['shortMessage'],
+ status: data['status'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/word-intonation-list.ts b/src/services/v1-v7-older-versions_/models/word-intonation-list.ts
new file mode 100644
index 0000000..ea4f24a
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/word-intonation-list.ts
@@ -0,0 +1,50 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const wordIntonationList = z.lazy(() => {
+ return z.object({
+ syllableIntonationList: z.array(z.array(z.string())).optional(),
+ word: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {WordIntonationList} wordIntonationList
+ * @property {string[][]}
+ * @property {string}
+ */
+export type WordIntonationList = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordIntonationListResponse = z.lazy(() => {
+ return z
+ .object({
+ syllable_intonation_list: z.array(z.array(z.string())).optional(),
+ word: z.string().optional(),
+ })
+ .transform((data) => ({
+ syllableIntonationList: data['syllable_intonation_list'],
+ word: data['word'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordIntonationListRequest = z.lazy(() => {
+ return z
+ .object({ syllableIntonationList: z.array(z.array(z.string())).nullish(), word: z.string().nullish() })
+ .transform((data) => ({
+ syllable_intonation_list: data['syllableIntonationList'],
+ word: data['word'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/word-score-list-phone-score-list-3.ts b/src/services/v1-v7-older-versions_/models/word-score-list-phone-score-list-3.ts
new file mode 100644
index 0000000..cfc1639
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/word-score-list-phone-score-list-3.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const wordScoreListPhoneScoreList3 = z.lazy(() => {
+ return z.object({
+ extent: z.array(z.number()).optional(),
+ phone: z.string().optional(),
+ qualityScore: z.number().optional(),
+ soundMostLike: z.string().optional(),
+ stressLevel: z.number().optional().nullable(),
+ stressScore: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {WordScoreListPhoneScoreList3} wordScoreListPhoneScoreList3
+ * @property {number[]}
+ * @property {string}
+ * @property {number}
+ * @property {string}
+ * @property {number}
+ * @property {number}
+ */
+export type WordScoreListPhoneScoreList3 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScoreListPhoneScoreList3Response = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).optional(),
+ phone: z.string().optional(),
+ quality_score: z.number().optional(),
+ sound_most_like: z.string().optional(),
+ stress_level: z.number().optional().nullable(),
+ stress_score: z.number().optional(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ phone: data['phone'],
+ qualityScore: data['quality_score'],
+ soundMostLike: data['sound_most_like'],
+ stressLevel: data['stress_level'],
+ stressScore: data['stress_score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScoreListPhoneScoreList3Request = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).nullish(),
+ phone: z.string().nullish(),
+ qualityScore: z.number().nullish(),
+ soundMostLike: z.string().nullish(),
+ stressLevel: z.number().nullish(),
+ stressScore: z.number().nullish(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ phone: data['phone'],
+ quality_score: data['qualityScore'],
+ sound_most_like: data['soundMostLike'],
+ stress_level: data['stressLevel'],
+ stress_score: data['stressScore'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/word-score-list-phone-score-list-4.ts b/src/services/v1-v7-older-versions_/models/word-score-list-phone-score-list-4.ts
new file mode 100644
index 0000000..2c29c0c
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/word-score-list-phone-score-list-4.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const wordScoreListPhoneScoreList4 = z.lazy(() => {
+ return z.object({
+ extent: z.array(z.number()).optional(),
+ phone: z.string().optional(),
+ qualityScore: z.number().optional(),
+ soundMostLike: z.string().optional(),
+ stressLevel: z.number().optional().nullable(),
+ stressScore: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {WordScoreListPhoneScoreList4} wordScoreListPhoneScoreList4
+ * @property {number[]}
+ * @property {string}
+ * @property {number}
+ * @property {string}
+ * @property {number}
+ * @property {number}
+ */
+export type WordScoreListPhoneScoreList4 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScoreListPhoneScoreList4Response = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).optional(),
+ phone: z.string().optional(),
+ quality_score: z.number().optional(),
+ sound_most_like: z.string().optional(),
+ stress_level: z.number().optional().nullable(),
+ stress_score: z.number().optional(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ phone: data['phone'],
+ qualityScore: data['quality_score'],
+ soundMostLike: data['sound_most_like'],
+ stressLevel: data['stress_level'],
+ stressScore: data['stress_score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScoreListPhoneScoreList4Request = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).nullish(),
+ phone: z.string().nullish(),
+ qualityScore: z.number().nullish(),
+ soundMostLike: z.string().nullish(),
+ stressLevel: z.number().nullish(),
+ stressScore: z.number().nullish(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ phone: data['phone'],
+ quality_score: data['qualityScore'],
+ sound_most_like: data['soundMostLike'],
+ stress_level: data['stressLevel'],
+ stress_score: data['stressScore'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/word-score-list-syllable-score-list-3.ts b/src/services/v1-v7-older-versions_/models/word-score-list-syllable-score-list-3.ts
new file mode 100644
index 0000000..62183c3
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/word-score-list-syllable-score-list-3.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const wordScoreListSyllableScoreList3 = z.lazy(() => {
+ return z.object({
+ extent: z.array(z.number()).optional(),
+ letters: z.string().optional(),
+ phoneCount: z.number().optional(),
+ qualityScore: z.number().optional(),
+ stressLevel: z.number().optional(),
+ stressScore: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {WordScoreListSyllableScoreList3} wordScoreListSyllableScoreList3
+ * @property {number[]}
+ * @property {string}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type WordScoreListSyllableScoreList3 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScoreListSyllableScoreList3Response = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).optional(),
+ letters: z.string().optional(),
+ phone_count: z.number().optional(),
+ quality_score: z.number().optional(),
+ stress_level: z.number().optional(),
+ stress_score: z.number().optional(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ letters: data['letters'],
+ phoneCount: data['phone_count'],
+ qualityScore: data['quality_score'],
+ stressLevel: data['stress_level'],
+ stressScore: data['stress_score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScoreListSyllableScoreList3Request = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).nullish(),
+ letters: z.string().nullish(),
+ phoneCount: z.number().nullish(),
+ qualityScore: z.number().nullish(),
+ stressLevel: z.number().nullish(),
+ stressScore: z.number().nullish(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ letters: data['letters'],
+ phone_count: data['phoneCount'],
+ quality_score: data['qualityScore'],
+ stress_level: data['stressLevel'],
+ stress_score: data['stressScore'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/word-score-list-syllable-score-list-4.ts b/src/services/v1-v7-older-versions_/models/word-score-list-syllable-score-list-4.ts
new file mode 100644
index 0000000..6692e08
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/word-score-list-syllable-score-list-4.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const wordScoreListSyllableScoreList4 = z.lazy(() => {
+ return z.object({
+ extent: z.array(z.number()).optional(),
+ letters: z.string().optional(),
+ phoneCount: z.number().optional(),
+ qualityScore: z.number().optional(),
+ stressLevel: z.number().optional(),
+ stressScore: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {WordScoreListSyllableScoreList4} wordScoreListSyllableScoreList4
+ * @property {number[]}
+ * @property {string}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type WordScoreListSyllableScoreList4 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScoreListSyllableScoreList4Response = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).optional(),
+ letters: z.string().optional(),
+ phone_count: z.number().optional(),
+ quality_score: z.number().optional(),
+ stress_level: z.number().optional(),
+ stress_score: z.number().optional(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ letters: data['letters'],
+ phoneCount: data['phone_count'],
+ qualityScore: data['quality_score'],
+ stressLevel: data['stress_level'],
+ stressScore: data['stress_score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScoreListSyllableScoreList4Request = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).nullish(),
+ letters: z.string().nullish(),
+ phoneCount: z.number().nullish(),
+ qualityScore: z.number().nullish(),
+ stressLevel: z.number().nullish(),
+ stressScore: z.number().nullish(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ letters: data['letters'],
+ phone_count: data['phoneCount'],
+ quality_score: data['qualityScore'],
+ stress_level: data['stressLevel'],
+ stress_score: data['stressScore'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/models/word-score-phone-score-list-2.ts b/src/services/v1-v7-older-versions_/models/word-score-phone-score-list-2.ts
new file mode 100644
index 0000000..46f3d86
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/models/word-score-phone-score-list-2.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const wordScorePhoneScoreList2 = z.lazy(() => {
+ return z.object({
+ extent: z.array(z.number()).optional(),
+ phone: z.string().optional(),
+ qualityScore: z.number().optional(),
+ soundMostLike: z.string().optional(),
+ stressLevel: z.any().optional().nullable(),
+ });
+});
+
+/**
+ *
+ * @typedef {WordScorePhoneScoreList2} wordScorePhoneScoreList2
+ * @property {number[]}
+ * @property {string}
+ * @property {number}
+ * @property {string}
+ * @property {any}
+ */
+export type WordScorePhoneScoreList2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScorePhoneScoreList2Response = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).optional(),
+ phone: z.string().optional(),
+ quality_score: z.number().optional(),
+ sound_most_like: z.string().optional(),
+ stress_level: z.any().optional().nullable(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ phone: data['phone'],
+ qualityScore: data['quality_score'],
+ soundMostLike: data['sound_most_like'],
+ stressLevel: data['stress_level'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const wordScorePhoneScoreList2Request = z.lazy(() => {
+ return z
+ .object({
+ extent: z.array(z.number()).nullish(),
+ phone: z.string().nullish(),
+ qualityScore: z.number().nullish(),
+ soundMostLike: z.string().nullish(),
+ stressLevel: z.any().nullish(),
+ })
+ .transform((data) => ({
+ extent: data['extent'],
+ phone: data['phone'],
+ quality_score: data['qualityScore'],
+ sound_most_like: data['soundMostLike'],
+ stress_level: data['stressLevel'],
+ }));
+});
diff --git a/src/services/v1-v7-older-versions_/request-params.ts b/src/services/v1-v7-older-versions_/request-params.ts
new file mode 100644
index 0000000..d8d0418
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/request-params.ts
@@ -0,0 +1,26 @@
+// This file was generated by liblab | https://liblab.com/
+
+export interface ScoreAWordOrSentence1Params {
+ key?: string;
+ dialect?: string;
+ userId?: string;
+ __?: string;
+}
+
+export interface ScoreAPhonemeList1Params {
+ key?: string;
+ userId?: string;
+ dialect?: string;
+}
+
+export interface ValidateText1Params {
+ key?: string;
+ text?: string;
+ dialect?: string;
+}
+
+export interface TranscribeScore1Params {
+ key?: string;
+ dialect?: string;
+ userId?: string;
+}
diff --git a/src/services/v1-v7-older-versions_/v1-v7-older-versions_.ts b/src/services/v1-v7-older-versions_/v1-v7-older-versions_.ts
new file mode 100644
index 0000000..5bd614f
--- /dev/null
+++ b/src/services/v1-v7-older-versions_/v1-v7-older-versions_.ts
@@ -0,0 +1,270 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import { BaseService } from '../base-service';
+import { ContentType, HttpResponse } from '../../http';
+import { RequestConfig } from '../../http/types';
+import { RequestBuilder } from '../../http/transport/request-builder';
+import {
+ ScoreAWordOrSentence1Request,
+ scoreAWordOrSentence1RequestRequest,
+} from './models/score-a-word-or-sentence1-request';
+import {
+ ScoreAWordOrSentence1OkResponse,
+ scoreAWordOrSentence1OkResponseResponse,
+} from './models/score-a-word-or-sentence1-ok-response';
+import {
+ ScoreAPhonemeList1Params,
+ ScoreAWordOrSentence1Params,
+ TranscribeScore1Params,
+ ValidateText1Params,
+} from './request-params';
+import { ScoreAPhonemeList1Request, scoreAPhonemeList1RequestRequest } from './models/score-a-phoneme-list1-request';
+import {
+ ScoreAPhonemeList1OkResponse,
+ scoreAPhonemeList1OkResponseResponse,
+} from './models/score-a-phoneme-list1-ok-response';
+import { ValidateText1OkResponse, validateText1OkResponseResponse } from './models/validate-text1-ok-response';
+import { TranscribeScore1Request, transcribeScore1RequestRequest } from './models/transcribe-score1-request';
+import { TranscribeScore1OkResponse, transcribeScore1OkResponseResponse } from './models/transcribe-score1-ok-response';
+
+export class V1V7OlderVersions_Service extends BaseService {
+ /**
+ * **In this example we score pronunciation of a word or sentence**
+Scoring pronunciation provides a quality score for the speaker's pronunciation for the entire utterance and for each word, syllable, phoneme. This allows overall activity scoring and pin-pointed feedback on pronunciation mistakes.
+
+In this request JSON result includes the following fields:
+
+Field | Description
+:------:|:-----:
+quality_score | An overall pronunciation score for the the entire utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric.
+syllable_score_list[] | a list of syllables in each word in the word_score_list[], each with it's own quality_score
+word_score_list[] | a list of words in the utterance, each with it's own quality_score
+syllable_score_list[] | a list of syllables in each word in the word_score_list[], each with it's own quality_score
+phone_score_list[] | a list of phonemes in each word in the word_score_list[], each with it's own quality_score
+extent[] | start and end boundaries of a syllable or phoneme in units of 10 msec.
+ * @param {string} [key] - API key issued by Speechace.
+ * @param {string} [dialect] - The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).
+
+en-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?`
+ * @param {string} [userId] - A unique anonymized identifier for the end-user who spoke the audio.
+
+Structure this field to include as much info as possible to aid in reporting and analytics.
+
+For example: **user_id=XYZ-ABC-99001** where:
+
+* XYZ is an id for your Product or App
+* ABC is an id for the customer/site/account
+* 99001 is an id for the end-user
+
+Ensure user_id is unique and anonymized containing **no personally identifiable information**.
+ * @param {string} [__] -
+ * @returns {Promise>} Score Pronunciation - Word Example / Score Pronunciation - Sentence Example / Score a Multiple Choice Text Example / Score Fluency example / Score Lexical Stress & Intonation / Score Vocabulary & Grammar
+ */
+ async scoreAWordOrSentence1(
+ body: ScoreAWordOrSentence1Request,
+ params?: ScoreAWordOrSentence1Params,
+ requestConfig?: RequestConfig,
+ ): Promise> {
+ const request = new RequestBuilder()
+ .setConfig(this.config)
+ .setBaseUrl(this.config)
+ .setMethod('POST')
+ .setPath('/api/scoring/text/v0.5/json')
+ .setRequestSchema(scoreAWordOrSentence1RequestRequest)
+ .setResponseSchema(scoreAWordOrSentence1OkResponseResponse)
+ .setRequestContentType(ContentType.MultipartFormData)
+ .setResponseContentType(ContentType.Json)
+ .setRetryAttempts(this.config, requestConfig)
+ .setRetryDelayMs(this.config, requestConfig)
+ .setResponseValidation(this.config, requestConfig)
+ .addQueryParam('key', params?.key)
+ .addQueryParam('dialect', params?.dialect)
+ .addQueryParam('user_id', params?.userId)
+ .addQueryParam('', params?.__)
+ .addHeaderParam('Content-Type', 'multipart/form-data')
+ .addBody(body)
+ .build();
+ return this.client.call(request);
+ }
+
+ /**
+ * **In this example we score the term:**
+"gotcha" /g/ao1/ch/ah0
+
+Since **gotcha** is an american vernacular and not a valid dictionary word we use the phoneme list API to score it.
+
+The phoneme list uses a different url endpoint and expects the list of phonemes in [Arpabet notation](https://en.wikipedia.org/wiki/Arpabet).
+
+Note that we specify phoneme stress as 0,1,2 per Arpabet notation. This API allows you to score any word or sentence that can phonetically expressed in Arpabet.
+
+**Copy the example code and be sure to:**
+
+1. Add your Speechace API key
+2. Add a valid file path in the **user_audio_file** parameter. *For example in curl the you would add something like @/tmp/gotcha_16k.wav*
+
+You can download a sample *gotcha_16k.wav* file [here](https://s3-us-west-2.amazonaws.com/speechace-public/sample-audio/gotcha_16k.wav).
+ * @param {string} [key] - API key issued by Speechace.
+ * @param {string} [userId] - A unique anonymized identifier for the end-user who spoke the audio.
+
+Structure this field to include as much info as possible to aid in reporting and analytics.
+
+For example: **user_id=XYZ-ABC-99001** where:
+
+* XYZ is an id for your Product or App
+* ABC is an id for the customer/site/account
+* 99001 is an id for the end-user
+
+Ensure user_id is unique and anonymized containing **no personally identifiable information**.
+ * @param {string} [dialect] - The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).
+
+en-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?`
+ * @returns {Promise>} Score a Phoneme list Example
+ */
+ async scoreAPhonemeList1(
+ body: ScoreAPhonemeList1Request,
+ params?: ScoreAPhonemeList1Params,
+ requestConfig?: RequestConfig,
+ ): Promise> {
+ const request = new RequestBuilder()
+ .setConfig(this.config)
+ .setBaseUrl(this.config)
+ .setMethod('POST')
+ .setPath('/api/scoring/phone_list/v0.5/json')
+ .setRequestSchema(scoreAPhonemeList1RequestRequest)
+ .setResponseSchema(scoreAPhonemeList1OkResponseResponse)
+ .setRequestContentType(ContentType.MultipartFormData)
+ .setResponseContentType(ContentType.Json)
+ .setRetryAttempts(this.config, requestConfig)
+ .setRetryDelayMs(this.config, requestConfig)
+ .setResponseValidation(this.config, requestConfig)
+ .addQueryParam('key', params?.key)
+ .addQueryParam('user_id', params?.userId)
+ .addQueryParam('dialect', params?.dialect)
+ .addHeaderParam('Content-Type', 'multipart/form-data')
+ .addBody(body)
+ .build();
+ return this.client.call(request);
+ }
+
+ /**
+ * In this example we validate whether all the words in the text exist in the Speechace lexicon. This API allows you to quickly check whether authored content will be able to be scored with Speechace. This is useful to use at the time of text authoring to avoid errors later on.
+Out of lexicon terms can be reported to support@speechace.com for inclusion. Or you can see the phoneme list API as an alternative.
+
+**Copy the example code and be sure to:**
+
+1. Add your Speechace API key
+2. Replace text with the text you wish to validate.
+3. Set the dialect parameter to the dialect you will use when scoring. If you are not sure which dialect will be used then validate once using each available dialect.
+ * @param {string} [key] - API key issued by Speechace.
+ * @param {string} [text] - A sentence or sequence of words to validate.
+ * @param {string} [dialect] - The dialect to use for validation. Default is "en-us". Supported values are "en-us" (US English) and "en-gb" (UK English).
+ * @returns {Promise>} Validate text with Speechace lexicon
+ */
+ async validateText1(
+ body: any,
+ params?: ValidateText1Params,
+ requestConfig?: RequestConfig,
+ ): Promise> {
+ const request = new RequestBuilder()
+ .setConfig(this.config)
+ .setBaseUrl(this.config)
+ .setMethod('POST')
+ .setPath('/api/validating/text/v0.5/json')
+ .setRequestSchema(z.any())
+ .setResponseSchema(validateText1OkResponseResponse)
+ .setRequestContentType(ContentType.MultipartFormData)
+ .setResponseContentType(ContentType.Json)
+ .setRetryAttempts(this.config, requestConfig)
+ .setRetryDelayMs(this.config, requestConfig)
+ .setResponseValidation(this.config, requestConfig)
+ .addQueryParam('key', params?.key)
+ .addQueryParam('text', params?.text)
+ .addQueryParam('dialect', params?.dialect)
+ .addHeaderParam('Content-Type', 'multipart/form-data')
+ .addBody(body)
+ .build();
+ return this.client.call(request);
+ }
+
+ /**
+ * **In this example we transcribe a free speaking audio and score the response providing an estimated IELTS score for each of the following aspects:**
+* Fluency
+* Pronunciation
+* Grammar
+* Vocabulary
+* Coherence
+
+
+The API accepts the user audio and a relevance context as inputs. The relevance context is typically a question prompt provided to the user. The relevance context is used to provide a relevance assessment of whether the users response is relevant or not. Irrelevant answers have the overall IELTS score automatically set to zero.
+
+In this request JSON result includes the following fields:
+
+| Field | Description |
+| --- | --- |
+| transcript | The speech-to-text transcript of what the user has said. |
+| relevance.class | Boolean. Whether the user response is relevant to the relevance context passed to the API. |
+| ielts_estimate | an estimate of the IELTS Speaking Fluency of the speaker |
+| ielts_subscore.vocab | an estimate of the IELTS Vocabulary level of the speaker's response |
+| ielts_subscore.grammar | an estimate of the IELTS Grammar level of the speaker's response |
+| ielts_subscore.coherence | an estimate of the IELTS Coherence level of the speaker's response |
+| quality_score | An overall pronunciation score for the the utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric. |
+| duration | total length of speech in seconds |
+| articulation | total length of articulation (speech minus pauses, hesitations and non-speech events such as laughter). Excludes beginning silence on very first segment and ending silence on very last segment. |
+| speech_rate | speaking rate in syllables per second. |
+| articulation_rate | articulation rate in syllables per second. |
+| syllable_count | Count of syllables in this segmtent |
+| word_count | Count of words in this segment |
+| correct_syllable_count | Count of correctly spoken syllables in this segment |
+| correct_word_count | Count of correctly spoken words in this segment |
+| syllable_correct_per_minute | correct_syllable_count / duration in mins |
+| word_correct_per_minute | correct_word_count / duration in mins |
+| all_pause_count | count of all pauses (filled and unfilled) which are longer than the minimum pause threshold |
+| all_pause_duration | total duration of all pauses (filled and unfilled) in seconds |
+| all_pause_list\[\] | a list of all the pauses with the begin/end markers for each in extents of 10 msecs |
+| mean_length_run | mean length of run in syllables between pauses |
+| max_length_run | max length of run in syllables between pauses |
+| segment_metrics_list\[\] | A list of segments within the overall text/audio with the IELTS scores, subscrores, and fluency metrics for each segment. |
+| syllable_score_list\[\] | a list of syllables in each word in the word_score_list\[\], each with it's own quality_score |
+| word_score_list\[\] | a list of words in the utterance, each with it's own quality_score |
+| syllable_score_list\[\] | a list of syllables in each word in the word_score_list\[\], each with it's own quality_score |
+| phone_score_list\[\] | a list of phonemes in each word in the word_score_list\[\], each with it's own quality_score |
+| extent\[\] | start and end boundaries of a syllable or phoneme in units of 10 msec. |
+ * @param {string} [key] - API key issued by Speechace.
+ * @param {string} [dialect] - The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).
+ * @param {string} [userId] - A unique anonymized identifier for the end-user who spoke the audio.
+Structure this field to include as much info as possible to aid in reporting and analytics.
+For example: **user_id=XYZ-ABC-99001** where:
+
+* XYZ is an id for your Product or App
+* ABC is an id for the customer/site/account
+* 99001 is an id for the end-user
+Ensure user_id is unique and anonymized containing **no personally identifiable information**.
+ * @returns {Promise>} Transcribe & Score / Score Relevance
+ */
+ async transcribeScore1(
+ body: TranscribeScore1Request,
+ params?: TranscribeScore1Params,
+ requestConfig?: RequestConfig,
+ ): Promise> {
+ const request = new RequestBuilder()
+ .setConfig(this.config)
+ .setBaseUrl(this.config)
+ .setMethod('POST')
+ .setPath('/api/scoring/speech/v0.5/json')
+ .setRequestSchema(transcribeScore1RequestRequest)
+ .setResponseSchema(transcribeScore1OkResponseResponse)
+ .setRequestContentType(ContentType.MultipartFormData)
+ .setResponseContentType(ContentType.Json)
+ .setRetryAttempts(this.config, requestConfig)
+ .setRetryDelayMs(this.config, requestConfig)
+ .setResponseValidation(this.config, requestConfig)
+ .addQueryParam('key', params?.key)
+ .addQueryParam('dialect', params?.dialect)
+ .addQueryParam('user_id', params?.userId)
+ .addHeaderParam('Content-Type', 'multipart/form-data')
+ .addBody(body)
+ .build();
+ return this.client.call(request);
+ }
+}
diff --git a/src/services/v1V7OlderVersions/V1V7OlderVersions.ts b/src/services/v1V7OlderVersions/V1V7OlderVersions.ts
deleted file mode 100644
index 8f38e0b..0000000
--- a/src/services/v1V7OlderVersions/V1V7OlderVersions.ts
+++ /dev/null
@@ -1,291 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-import BaseService from '../../BaseService';
-
-import { ScoreVocabularyGrammarResponse } from './models/ScoreVocabularyGrammarResponse';
-import { ScoreVocabularyGrammarRequest } from './models/ScoreVocabularyGrammarRequest';
-import { ScoreAPhonemeList1Response } from './models/ScoreAPhonemeList1Response';
-import { ScoreAPhonemeList1Request } from './models/ScoreAPhonemeList1Request';
-import { ValidateText1Response } from './models/ValidateText1Response';
-import { ValidateText1Request } from './models/ValidateText1Request';
-import { AssessRelevance1Response } from './models/AssessRelevance1Response';
-import { AssessRelevance1Request } from './models/AssessRelevance1Request';
-
-import { serializeQuery } from '../../http/QuerySerializer';
-
-export class V1V7OlderVersionsService extends BaseService {
- /**
- * @summary Score Vocabulary & Grammar
- * @description **In this example we score the IELTS Speaking Fluency and obtain the IELTS Vocabulary and Grammar subscore of a scripted speech answer.**
-
-Scoring Vocabulary & Grammar is typically done in Spontaneous speaking Transcribe & Score requests. In this example we demonstrate how it can be done in a scripted speech request as well.
-
-In this request in addition to fluency and pronunciation scores, the fluency node in the JSON result includes the following scores:
-
-| Field | Description |
-| --- | --- |
-| ielts_estimate | an estimate of the IELTS Speaking Fluency of the speaker. |
-| pte_estimate | an estimate of the PTE Read-Aloud Speaking Fluency of the speaker. |
-| ielts_subscore.vocab | an estimate of the Vocabulary IELTS band of the text submitted. |
-| ielts_subscore.grammar | an estimate of the Grammar IELTS band of the text submitted. |
-| segment_metrics_list\[\] | A list of segments within the overall text/audio with the fluency and ielt_subscore.vocab scores for each segment. |
-
- * @param optionalParams - Optional parameters
- * @param optionalParams.key - API key issued by Speechace.
- * @param optionalParams.userId - A unique anonymized identifier for the end-user who spoke the audio.
-
-Structure this field to include as much info as possible to aid in reporting and analytics.
-
-For example: **user_id=XYZ-ABC-99001** where:
-
-* XYZ is an id for your Product or App
-* ABC is an id for the customer/site/account
-* 99001 is an id for the end-user
-
-Ensure user_id is unique and anonymized containing **no personally identifiable information**.
- * @param optionalParams.dialect - The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).
-
-en-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?`
- * @returns {Promise} - The promise with the result
- */
- async scoreVocabularyGrammar(
- input: ScoreVocabularyGrammarRequest,
- optionalParams: { key?: string; userId?: string; dialect?: string } = {},
- ): Promise {
- const { key, userId, dialect } = optionalParams;
-
- const queryParams: string[] = [];
- const headers: { [key: string]: string } = { 'Content-Type': 'multipart/form-data' };
- if (key) {
- queryParams.push(serializeQuery('form', true, 'key', key));
- }
- if (userId) {
- queryParams.push(serializeQuery('form', true, 'user_id', userId));
- }
- if (dialect) {
- queryParams.push(serializeQuery('form', true, 'dialect', dialect));
- }
- const urlEndpoint = '/api/scoring/text/v0.5/json';
- const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
- const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`);
- const formInput = V1V7OlderVersionsService.formData(input);
- const response: any = await this.httpClient.post(
- finalUrl,
- formInput,
- {
- ...headers,
- },
- true,
- );
- const responseModel = response.data as ScoreVocabularyGrammarResponse;
- return responseModel;
- }
-
- /**
- * @summary Score a Phoneme list
- * @description **In this example we score the term:**
-
-"gotcha" /g/ao1/ch/ah0
-
-Since **gotcha** is an american vernacular and not a valid dictionary word we use the phoneme list API to score it.
-
-The phoneme list uses a different url endpoint and expects the list of phonemes in [Arpabet notation](https://en.wikipedia.org/wiki/Arpabet).
-
-Note that we specify phoneme stress as 0,1,2 per Arpabet notation. This API allows you to score any word or sentence that can phonetically expressed in Arpabet.
-
-**Copy the example code and be sure to:**
-
-1. Add your Speechace API key
-2. Add a valid file path in the **user_audio_file** parameter. *For example in curl the you would add something like @/tmp/gotcha_16k.wav*
-
-You can download a sample *gotcha_16k.wav* file [here](https://s3-us-west-2.amazonaws.com/speechace-public/sample-audio/gotcha_16k.wav).
-
- * @param optionalParams - Optional parameters
- * @param optionalParams.key - API key issued by Speechace.
- * @param optionalParams.userId - A unique anonymized identifier for the end-user who spoke the audio.
-
-Structure this field to include as much info as possible to aid in reporting and analytics.
-
-For example: **user_id=XYZ-ABC-99001** where:
-
-* XYZ is an id for your Product or App
-* ABC is an id for the customer/site/account
-* 99001 is an id for the end-user
-
-Ensure user_id is unique and anonymized containing **no personally identifiable information**.
- * @param optionalParams.dialect - The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).
-
-en-gb requires setting v0.1 in url path. i.e. `https://api.speechace.co/api/scoring/text/v0.1/json?`
- * @returns {Promise} - The promise with the result
- */
- async scoreAPhonemeList1(
- input: ScoreAPhonemeList1Request,
- optionalParams: { key?: string; userId?: string; dialect?: string } = {},
- ): Promise {
- const { key, userId, dialect } = optionalParams;
-
- const queryParams: string[] = [];
- const headers: { [key: string]: string } = { 'Content-Type': 'multipart/form-data' };
- if (key) {
- queryParams.push(serializeQuery('form', true, 'key', key));
- }
- if (userId) {
- queryParams.push(serializeQuery('form', true, 'user_id', userId));
- }
- if (dialect) {
- queryParams.push(serializeQuery('form', true, 'dialect', dialect));
- }
- const urlEndpoint = '/api/scoring/phone_list/v0.5/json';
- const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
- const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`);
- const formInput = V1V7OlderVersionsService.formData(input);
- const response: any = await this.httpClient.post(
- finalUrl,
- formInput,
- {
- ...headers,
- },
- true,
- );
- const responseModel = response.data as ScoreAPhonemeList1Response;
- return responseModel;
- }
-
- /**
- * @summary Validate Text
- * @description In this example we validate whether all the words in the text exist in the Speechace lexicon. This API allows you to quickly check whether authored content will be able to be scored with Speechace. This is useful to use at the time of text authoring to avoid errors later on.
-
-Out of lexicon terms can be reported to support@speechace.com for inclusion. Or you can see the phoneme list API as an alternative.
-
-**Copy the example code and be sure to:**
-
-1. Add your Speechace API key
-2. Replace text with the text you wish to validate.
-3. Set the dialect parameter to the dialect you will use when scoring. If you are not sure which dialect will be used then validate once using each available dialect.
-
- * @param optionalParams - Optional parameters
- * @param optionalParams.key - API key issued by Speechace.
- * @param optionalParams.text - A sentence or sequence of words to validate.
- * @param optionalParams.dialect - The dialect to use for validation. Default is "en-us". Supported values are "en-us" (US English) and "en-gb" (UK English).
- * @returns {Promise} - The promise with the result
- */
- async validateText1(
- input: ValidateText1Request,
- optionalParams: { key?: string; text?: string; dialect?: string } = {},
- ): Promise {
- const { key, text, dialect } = optionalParams;
-
- const queryParams: string[] = [];
- const headers: { [key: string]: string } = { 'Content-Type': 'multipart/form-data' };
- if (key) {
- queryParams.push(serializeQuery('form', true, 'key', key));
- }
- if (text) {
- queryParams.push(serializeQuery('form', true, 'text', text));
- }
- if (dialect) {
- queryParams.push(serializeQuery('form', true, 'dialect', dialect));
- }
- const urlEndpoint = '/api/validating/text/v0.5/json';
- const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
- const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`);
- const formInput = V1V7OlderVersionsService.formData(input);
- const response: any = await this.httpClient.post(
- finalUrl,
- formInput,
- {
- ...headers,
- },
- true,
- );
- const responseModel = response.data as ValidateText1Response;
- return responseModel;
- }
-
- /**
- * @summary Assess Relevance
- * @description **In this example we transcribe a free speaking audio and evaluate the relevance of the response given a particular question prompt.**
-
-In addition we also score Fluency, Pronunciation, Grammar, Vocabulary, and Coherence on an IELTS Speaking scale.
-
-The API accepts the user audio and a relevance context as inputs. The relevance context is typically a question prompt provided to the user.
-
-In this request JSON result includes the following fields:
-
-| Field | Description |
-| --- | --- |
-| transcript | The speech-to-text transcript of what the user has said. |
-| relevance.class | Boolean. Whether the user response is relevant to the relevance context passed to the API. |
-| ielts_estimate | an estimate of the IELTS Speaking Fluency of the speaker |
-| ielts_subscore.vocab | an estimate of the IELTS Vocabulary level of the speaker's response |
-| ielts_subscore.grammar | an estimate of the IELTS Grammar level of the speaker's response |
-| ielts_subscore.coherence | an estimate of the IELTS Coherence level of the speaker's response |
-| quality_score | An overall pronunciation score for the the utterance on a scale of 0 to 100. See [guide](https://docs.speechace.com/#b41375b3-a9e6-48f0-aa92-a9a1a0aed116) for detail on score rubric. |
-| duration | total length of speech in seconds |
-| articulation | total length of articulation (speech minus pauses, hesitations and non-speech events such as laughter). Excludes beginning silence on very first segment and ending silence on very last segment. |
-| speech_rate | speaking rate in syllables per second. |
-| articulation_rate | articulation rate in syllables per second. |
-| syllable_count | Count of syllables in this segmtent |
-| word_count | Count of words in this segment |
-| correct_syllable_count | Count of correctly spoken syllables in this segment |
-| correct_word_count | Count of correctly spoken words in this segment |
-| syllable_correct_per_minute | correct_syllable_count / duration in mins |
-| word_correct_per_minute | correct_word_count / duration in mins |
-| all_pause_count | count of all pauses (filled and unfilled) which are longer than the minimum pause threshold |
-| all_pause_duration | total duration of all pauses (filled and unfilled) in seconds |
-| all_pause_list\[\] | a list of all the pauses with the begin/end markers for each in extents of 10 msecs |
-| mean_length_run | mean length of run in syllables between pauses |
-| max_length_run | max length of run in syllables between pauses |
-| segment_metrics_list\[\] | A list of segments within the overall text/audio with the IELTS scores, subscrores, and fluency metrics for each segment. |
-| syllable_score_list\[\] | a list of syllables in each word in the word_score_list\[\], each with it's own quality_score |
-| word_score_list\[\] | a list of words in the utterance, each with it's own quality_score |
-| syllable_score_list\[\] | a list of syllables in each word in the word_score_list\[\], each with it's own quality_score |
-| phone_score_list\[\] | a list of phonemes in each word in the word_score_list\[\], each with it's own quality_score |
-| extent\[\] | start and end boundaries of a syllable or phoneme in units of 10 msec. |
-
- * @param optionalParams - Optional parameters
- * @param optionalParams.key - API key issued by Speechace.
- * @param optionalParams.dialect - The dialect to use for scoring. Supported values are "en-us" (US English) and "en-gb" (UK English).
- * @param optionalParams.userId - A unique anonymized identifier for the end-user who spoke the audio.
-Structure this field to include as much info as possible to aid in reporting and analytics.
-For example: **user_id=XYZ-ABC-99001** where:
-
-* XYZ is an id for your Product or App
-* ABC is an id for the customer/site/account
-* 99001 is an id for the end-user
-Ensure user_id is unique and anonymized containing **no personally identifiable information**.
- * @returns {Promise} - The promise with the result
- */
- async assessRelevance1(
- input: AssessRelevance1Request,
- optionalParams: { key?: string; dialect?: string; userId?: string } = {},
- ): Promise {
- const { key, dialect, userId } = optionalParams;
-
- const queryParams: string[] = [];
- const headers: { [key: string]: string } = { 'Content-Type': 'multipart/form-data' };
- if (key) {
- queryParams.push(serializeQuery('form', true, 'key', key));
- }
- if (dialect) {
- queryParams.push(serializeQuery('form', true, 'dialect', dialect));
- }
- if (userId) {
- queryParams.push(serializeQuery('form', true, 'user_id', userId));
- }
- const urlEndpoint = '/api/scoring/speech/v0.5/json';
- const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
- const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`);
- const formInput = V1V7OlderVersionsService.formData(input);
- const response: any = await this.httpClient.post(
- finalUrl,
- formInput,
- {
- ...headers,
- },
- true,
- );
- const responseModel = response.data as AssessRelevance1Response;
- return responseModel;
- }
-}
diff --git a/src/services/v1V7OlderVersions/index.ts b/src/services/v1V7OlderVersions/index.ts
deleted file mode 100644
index 4e7a12b..0000000
--- a/src/services/v1V7OlderVersions/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export type { AssessRelevance1Request } from './models/AssessRelevance1Request';
-export type { AssessRelevance1Response } from './models/AssessRelevance1Response';
-export type { ScoreAPhonemeList1Request } from './models/ScoreAPhonemeList1Request';
-export type { ScoreAPhonemeList1Response } from './models/ScoreAPhonemeList1Response';
-export type { ScoreVocabularyGrammarRequest } from './models/ScoreVocabularyGrammarRequest';
-export type { ScoreVocabularyGrammarResponse } from './models/ScoreVocabularyGrammarResponse';
-export type { ValidateText1Request } from './models/ValidateText1Request';
-export type { ValidateText1Response } from './models/ValidateText1Response';
diff --git a/src/services/v1V7OlderVersions/models/AssessRelevance1Request.ts b/src/services/v1V7OlderVersions/models/AssessRelevance1Request.ts
deleted file mode 100644
index 2ba31e3..0000000
--- a/src/services/v1V7OlderVersions/models/AssessRelevance1Request.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface AssessRelevance1Request {
- /**
- * includes fluency scoring for this request. To use this field you must have a Speechace API PRO key.
- */
- include_fluency?: string;
- /**
- * include IELTS subscores for (Vocabulary, Grammar, Coherence).
- */
- include_ielts_subscore?: string;
- /**
- * automatically identify the phonetic mapping for any unknown words such as names or locations and use that for scoring.
- */
- include_unknown_words?: string;
- /**
- * Question Prompt text provided to the user. When this parameter is passed, the relevance of the user audio transcript is evaluated for the given question prompt and a resulting relevance class is returned in .speech_score.relevance.class (TRUE/FALSE). A FALSE relevance class will result in .speech_score.fluency.overall_metrics.ielts_estimate and .speech_score.fluency.overall_metrics.pte_estimate to be set to the lowest possible score.
- */
- relevance_context?: string;
- /**
- * file with user audio (wav, mp3, m4a, webm, ogg, aiff)
- */
- user_audio_file?: import('fs').ReadStream | Buffer | File;
-}
diff --git a/src/services/v1V7OlderVersions/models/AssessRelevance1Response.ts b/src/services/v1V7OlderVersions/models/AssessRelevance1Response.ts
deleted file mode 100644
index c91d58f..0000000
--- a/src/services/v1V7OlderVersions/models/AssessRelevance1Response.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface AssessRelevance1Response {
- quota_remaining?: number;
- speech_score?: SpeechScore;
- status?: string;
- version?: string;
-}
-interface SpeechScore {
- fidelity_class?: string;
- fluency?: Fluency;
- quality_score?: number;
- relevance?: Relevance;
- transcript?: string;
- word_score_list?: {
- ending_punctuation?: string;
- phone_score_list?: {
- extent?: number[];
- phone?: string;
- quality_score?: number;
- sound_most_like?: string;
- stress_level?: number;
- stress_score?: number;
- }[];
- quality_score?: number;
- syllable_score_list?: {
- extent?: number[];
- letters?: string;
- phone_count?: number;
- quality_score?: number;
- stress_level?: number;
- stress_score?: number;
- }[];
- word?: string;
- }[];
-}
-interface Fluency {
- fluency_version?: FluencyVersion;
- ielts_subscore_version?: IeltsSubscoreVersion;
- overall_metrics?: OverallMetrics;
- segment_metrics_list?: {
- all_pause_count?: number;
- all_pause_duration?: number;
- all_pause_list?: number[][];
- articulation_length?: number;
- articulation_rate?: number;
- correct_syllable_count?: number;
- correct_word_count?: number;
- duration?: number;
- fluency_score?: number;
- ielts_estimate?: number;
- ielts_subscore?: IeltsSubscore1;
- max_length_run?: number;
- mean_length_run?: number;
- pte_estimate?: number;
- segment?: number[];
- speech_rate?: number;
- syllable_correct_per_minute?: number;
- syllable_count?: number;
- word_correct_per_minute?: number;
- word_count?: number;
- }[];
-}
-interface FluencyVersion {
- [k: string]: unknown;
-}
-interface IeltsSubscoreVersion {
- [k: string]: unknown;
-}
-interface OverallMetrics {
- all_pause_count?: number;
- all_pause_duration?: number;
- all_pause_list?: number[][];
- articulation_length?: number;
- articulation_rate?: number;
- correct_syllable_count?: number;
- correct_word_count?: number;
- duration?: number;
- fluency_score?: number;
- ielts_estimate?: number;
- ielts_subscore?: IeltsSubscore;
- max_length_run?: number;
- mean_length_run?: number;
- pte_estimate?: number;
- segment?: number[];
- speech_rate?: number;
- syllable_correct_per_minute?: number;
- syllable_count?: number;
- word_correct_per_minute?: number;
- word_count?: number;
-}
-interface IeltsSubscore {
- coherence?: number;
- grammar?: number;
- vocab?: number;
-}
-interface IeltsSubscore1 {
- coherence?: number;
- grammar?: number;
- vocab?: number;
-}
-interface Relevance {
- class_?: string;
-}
diff --git a/src/services/v1V7OlderVersions/models/ScoreAPhonemeList1Request.ts b/src/services/v1V7OlderVersions/models/ScoreAPhonemeList1Request.ts
deleted file mode 100644
index eff8d48..0000000
--- a/src/services/v1V7OlderVersions/models/ScoreAPhonemeList1Request.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface ScoreAPhonemeList1Request {
- /**
- * A phoneme list to score.
- */
- phone_list?: string;
- /**
- * A unique identifier for the activity or question this user audio is answering.
- *
- * Structure this field to include as much info as possible to aid in reporting and analytics.
- *
- * For example: **question_info='u1/q1'** where:
- *
- * * u1: means the question belongs to Unit 1 in your content
- * * q1: means this is question 1 within the unit
- *
- * You can add more levels as needed.
- *
- * Ensure **no personally identifiable information** is passed in this field.
- */
- question_info?: string;
- /**
- * file with user audio (wav, mp3, m4a, webm, ogg, aiff)
- */
- user_audio_file?: import('fs').ReadStream | Buffer | File;
-}
diff --git a/src/services/v1V7OlderVersions/models/ScoreAPhonemeList1Response.ts b/src/services/v1V7OlderVersions/models/ScoreAPhonemeList1Response.ts
deleted file mode 100644
index ae7001b..0000000
--- a/src/services/v1V7OlderVersions/models/ScoreAPhonemeList1Response.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface ScoreAPhonemeList1Response {
- quota_remaining?: number;
- status?: string;
- version?: string;
- word_score?: WordScore;
-}
-interface WordScore {
- phone_score_list?: {
- extent?: number[];
- phone?: string;
- quality_score?: number;
- sound_most_like?: string;
- stress_level?: StressLevel;
- }[];
- quality_score?: number;
- word?: string;
-}
-interface StressLevel {
- [k: string]: unknown;
-}
diff --git a/src/services/v1V7OlderVersions/models/ScoreVocabularyGrammarRequest.ts b/src/services/v1V7OlderVersions/models/ScoreVocabularyGrammarRequest.ts
deleted file mode 100644
index bef764a..0000000
--- a/src/services/v1V7OlderVersions/models/ScoreVocabularyGrammarRequest.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface ScoreVocabularyGrammarRequest {
- /**
- * includes fluency scoring for this request. To use this field you must have a Speechace API PRO key.
- */
- include_fluency?: string;
- /**
- * beta: include IELTS subscores for (Vocabulary, Grammar).
- */
- include_ielts_subscore?: string;
- /**
- * A unique identifier for the activity or question this user audio is answering.
- *
- * Structure this field to include as much info as possible to aid in reporting and analytics.
- *
- * For example: **question_info='u1/q1'** where:
- *
- * * u1: means the question belongs to Unit 1 in your content
- * * q1: means this is question 1 within the unit
- *
- * You can add more levels as needed.
- *
- * Ensure **no personally identifiable information** is passed in this field.
- */
- question_info?: string;
- /**
- * One or more paragraphs of text to score.
- */
- text?: string;
- /**
- * file with user audio (wav, mp3, m4a, webm, ogg, aiff)
- */
- user_audio_file?: import('fs').ReadStream | Buffer | File;
-}
diff --git a/src/services/v1V7OlderVersions/models/ScoreVocabularyGrammarResponse.ts b/src/services/v1V7OlderVersions/models/ScoreVocabularyGrammarResponse.ts
deleted file mode 100644
index 9b1b255..0000000
--- a/src/services/v1V7OlderVersions/models/ScoreVocabularyGrammarResponse.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface ScoreVocabularyGrammarResponse {
- quota_remaining?: number;
- status?: string;
- text_score?: TextScore;
- version?: string;
-}
-interface TextScore {
- fidelity_class?: string;
- fluency?: Fluency;
- quality_score?: number;
- text?: string;
- word_score_list?: {
- ending_punctuation?: string;
- phone_score_list?: {
- extent?: number[];
- phone?: string;
- quality_score?: number;
- sound_most_like?: string;
- stress_level?: number;
- stress_score?: number;
- }[];
- quality_score?: number;
- syllable_score_list?: {
- extent?: number[];
- letters?: string;
- phone_count?: number;
- quality_score?: number;
- stress_level?: number;
- stress_score?: number;
- }[];
- word?: string;
- }[];
-}
-interface Fluency {
- fluency_version?: FluencyVersion;
- ielts_subscore_version?: IeltsSubscoreVersion;
- overall_metrics?: OverallMetrics;
- segment_metrics_list?: {
- all_pause_count?: number;
- all_pause_duration?: number;
- all_pause_list?: number[][];
- articulation_length?: number;
- articulation_rate?: number;
- correct_syllable_count?: number;
- correct_word_count?: number;
- duration?: number;
- fluency_score?: number;
- ielts_estimate?: number;
- ielts_subscore?: IeltsSubscore1;
- max_length_run?: number;
- mean_length_run?: number;
- pte_estimate?: number;
- segment?: number[];
- speech_rate?: number;
- syllable_correct_per_minute?: number;
- syllable_count?: number;
- word_correct_per_minute?: number;
- word_count?: number;
- }[];
-}
-interface FluencyVersion {
- [k: string]: unknown;
-}
-interface IeltsSubscoreVersion {
- [k: string]: unknown;
-}
-interface OverallMetrics {
- all_pause_count?: number;
- all_pause_duration?: number;
- all_pause_list?: number[][];
- articulation_length?: number;
- articulation_rate?: number;
- correct_syllable_count?: number;
- correct_word_count?: number;
- duration?: number;
- fluency_score?: number;
- ielts_estimate?: number;
- ielts_subscore?: IeltsSubscore;
- max_length_run?: number;
- mean_length_run?: number;
- pte_estimate?: number;
- segment?: number[];
- speech_rate?: number;
- syllable_correct_per_minute?: number;
- syllable_count?: number;
- word_correct_per_minute?: number;
- word_count?: number;
-}
-interface IeltsSubscore {
- grammar?: number;
- vocab?: number;
-}
-interface IeltsSubscore1 {
- grammar?: number;
- vocab?: number;
-}
diff --git a/src/services/v1V7OlderVersions/models/ValidateText1Response.ts b/src/services/v1V7OlderVersions/models/ValidateText1Response.ts
deleted file mode 100644
index 6574367..0000000
--- a/src/services/v1V7OlderVersions/models/ValidateText1Response.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-// This file was generated by liblab | https://liblab.com/
-
-export interface ValidateText1Response {
- detail_message?: string;
- short_message?: string;
- status?: string;
-}
diff --git a/src/services/v9Latest/models/ValidateTextRequest.ts b/src/services/v9-latest_/index.ts
similarity index 60%
rename from src/services/v9Latest/models/ValidateTextRequest.ts
rename to src/services/v9-latest_/index.ts
index e5cf217..bbb4815 100644
--- a/src/services/v9Latest/models/ValidateTextRequest.ts
+++ b/src/services/v9-latest_/index.ts
@@ -1,3 +1,3 @@
// This file was generated by liblab | https://liblab.com/
-export interface ValidateTextRequest {}
+export * from './v9-latest_';
diff --git a/src/services/v9-latest_/models/academic-language-use.ts b/src/services/v9-latest_/models/academic-language-use.ts
new file mode 100644
index 0000000..fe92de8
--- /dev/null
+++ b/src/services/v9-latest_/models/academic-language-use.ts
@@ -0,0 +1,55 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const academicLanguageUse = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ message: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {AcademicLanguageUse} academicLanguageUse
+ * @property {string}
+ * @property {string}
+ * @property {number}
+ */
+export type AcademicLanguageUse = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const academicLanguageUseResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ message: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ message: data['message'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const academicLanguageUseRequest = z.lazy(() => {
+ return z
+ .object({ level: z.string().nullish(), message: z.string().nullish(), score: z.number().nullish() })
+ .transform((data) => ({
+ level: data['level'],
+ message: data['message'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/adverb-diversity.ts b/src/services/v9-latest_/models/adverb-diversity.ts
new file mode 100644
index 0000000..8d95d67
--- /dev/null
+++ b/src/services/v9-latest_/models/adverb-diversity.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const adverbDiversity = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {AdverbDiversity} adverbDiversity
+ * @property {string}
+ * @property {number}
+ */
+export type AdverbDiversity = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const adverbDiversityResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const adverbDiversityRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/adverb-modifier-variation.ts b/src/services/v9-latest_/models/adverb-modifier-variation.ts
new file mode 100644
index 0000000..4fa3a08
--- /dev/null
+++ b/src/services/v9-latest_/models/adverb-modifier-variation.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const adverbModifierVariation = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {AdverbModifierVariation} adverbModifierVariation
+ * @property {string}
+ * @property {number}
+ */
+export type AdverbModifierVariation = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const adverbModifierVariationResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const adverbModifierVariationRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/basic-connectives.ts b/src/services/v9-latest_/models/basic-connectives.ts
new file mode 100644
index 0000000..39b349b
--- /dev/null
+++ b/src/services/v9-latest_/models/basic-connectives.ts
@@ -0,0 +1,55 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const basicConnectives = z.lazy(() => {
+ return z.object({
+ examples: z.array(z.string()).optional(),
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {BasicConnectives} basicConnectives
+ * @property {string[]}
+ * @property {string}
+ * @property {number}
+ */
+export type BasicConnectives = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const basicConnectivesResponse = z.lazy(() => {
+ return z
+ .object({
+ examples: z.array(z.string()).optional(),
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ examples: data['examples'],
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const basicConnectivesRequest = z.lazy(() => {
+ return z
+ .object({ examples: z.array(z.string()).nullish(), level: z.string().nullish(), score: z.number().nullish() })
+ .transform((data) => ({
+ examples: data['examples'],
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/causal-connectives.ts b/src/services/v9-latest_/models/causal-connectives.ts
new file mode 100644
index 0000000..d50043f
--- /dev/null
+++ b/src/services/v9-latest_/models/causal-connectives.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const causalConnectives = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {CausalConnectives} causalConnectives
+ * @property {string}
+ * @property {number}
+ */
+export type CausalConnectives = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const causalConnectivesResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const causalConnectivesRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/coherence-overall-metrics.ts b/src/services/v9-latest_/models/coherence-overall-metrics.ts
new file mode 100644
index 0000000..57c1950
--- /dev/null
+++ b/src/services/v9-latest_/models/coherence-overall-metrics.ts
@@ -0,0 +1,90 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import { adverbDiversity, adverbDiversityRequest, adverbDiversityResponse } from './adverb-diversity';
+import { basicConnectives, basicConnectivesRequest, basicConnectivesResponse } from './basic-connectives';
+import { causalConnectives, causalConnectivesRequest, causalConnectivesResponse } from './causal-connectives';
+import { lexicalDensity, lexicalDensityRequest, lexicalDensityResponse } from './lexical-density';
+import { negativeConnectives, negativeConnectivesRequest, negativeConnectivesResponse } from './negative-connectives';
+import { pronounDensity, pronounDensityRequest, pronounDensityResponse } from './pronoun-density';
+import { verbDiversity, verbDiversityRequest, verbDiversityResponse } from './verb-diversity';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const coherenceOverallMetrics = z.lazy(() => {
+ return z.object({
+ adverbDiversity: adverbDiversity.optional(),
+ basicConnectives: basicConnectives.optional(),
+ causalConnectives: causalConnectives.optional(),
+ lexicalDensity: lexicalDensity.optional(),
+ negativeConnectives: negativeConnectives.optional(),
+ pronounDensity: pronounDensity.optional(),
+ verbDiversity: verbDiversity.optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {CoherenceOverallMetrics} coherenceOverallMetrics
+ * @property {AdverbDiversity}
+ * @property {BasicConnectives}
+ * @property {CausalConnectives}
+ * @property {LexicalDensity}
+ * @property {NegativeConnectives}
+ * @property {PronounDensity}
+ * @property {VerbDiversity}
+ */
+export type CoherenceOverallMetrics = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const coherenceOverallMetricsResponse = z.lazy(() => {
+ return z
+ .object({
+ adverb_diversity: adverbDiversityResponse.optional(),
+ basic_connectives: basicConnectivesResponse.optional(),
+ causal_connectives: causalConnectivesResponse.optional(),
+ lexical_density: lexicalDensityResponse.optional(),
+ negative_connectives: negativeConnectivesResponse.optional(),
+ pronoun_density: pronounDensityResponse.optional(),
+ verb_diversity: verbDiversityResponse.optional(),
+ })
+ .transform((data) => ({
+ adverbDiversity: data['adverb_diversity'],
+ basicConnectives: data['basic_connectives'],
+ causalConnectives: data['causal_connectives'],
+ lexicalDensity: data['lexical_density'],
+ negativeConnectives: data['negative_connectives'],
+ pronounDensity: data['pronoun_density'],
+ verbDiversity: data['verb_diversity'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const coherenceOverallMetricsRequest = z.lazy(() => {
+ return z
+ .object({
+ adverbDiversity: adverbDiversityRequest.nullish(),
+ basicConnectives: basicConnectivesRequest.nullish(),
+ causalConnectives: causalConnectivesRequest.nullish(),
+ lexicalDensity: lexicalDensityRequest.nullish(),
+ negativeConnectives: negativeConnectivesRequest.nullish(),
+ pronounDensity: pronounDensityRequest.nullish(),
+ verbDiversity: verbDiversityRequest.nullish(),
+ })
+ .transform((data) => ({
+ adverb_diversity: data['adverbDiversity'],
+ basic_connectives: data['basicConnectives'],
+ causal_connectives: data['causalConnectives'],
+ lexical_density: data['lexicalDensity'],
+ negative_connectives: data['negativeConnectives'],
+ pronoun_density: data['pronounDensity'],
+ verb_diversity: data['verbDiversity'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/coherence.ts b/src/services/v9-latest_/models/coherence.ts
new file mode 100644
index 0000000..6bc273a
--- /dev/null
+++ b/src/services/v9-latest_/models/coherence.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ coherenceOverallMetrics,
+ coherenceOverallMetricsRequest,
+ coherenceOverallMetricsResponse,
+} from './coherence-overall-metrics';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const coherence = z.lazy(() => {
+ return z.object({
+ overallMetrics: coherenceOverallMetrics.optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {Coherence} coherence
+ * @property {CoherenceOverallMetrics}
+ */
+export type Coherence = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const coherenceResponse = z.lazy(() => {
+ return z
+ .object({
+ overall_metrics: coherenceOverallMetricsResponse.optional(),
+ })
+ .transform((data) => ({
+ overallMetrics: data['overall_metrics'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const coherenceRequest = z.lazy(() => {
+ return z.object({ overallMetrics: coherenceOverallMetricsRequest.nullish() }).transform((data) => ({
+ overall_metrics: data['overallMetrics'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/collocation-commonality.ts b/src/services/v9-latest_/models/collocation-commonality.ts
new file mode 100644
index 0000000..e36b852
--- /dev/null
+++ b/src/services/v9-latest_/models/collocation-commonality.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const collocationCommonality = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {CollocationCommonality} collocationCommonality
+ * @property {string}
+ * @property {number}
+ */
+export type CollocationCommonality = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const collocationCommonalityResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const collocationCommonalityRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/errors.ts b/src/services/v9-latest_/models/errors.ts
new file mode 100644
index 0000000..9f7898e
--- /dev/null
+++ b/src/services/v9-latest_/models/errors.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const errors = z.lazy(() => {
+ return z.object({
+ category: z.string().optional(),
+ matchedText: z.string().optional(),
+ message: z.string().optional(),
+ replacements: z.array(z.string()).optional(),
+ span: z.array(z.number()).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {Errors} errors
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ * @property {string[]}
+ * @property {number[]}
+ */
+export type Errors = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const errorsResponse = z.lazy(() => {
+ return z
+ .object({
+ category: z.string().optional(),
+ matched_text: z.string().optional(),
+ message: z.string().optional(),
+ replacements: z.array(z.string()).optional(),
+ span: z.array(z.number()).optional(),
+ })
+ .transform((data) => ({
+ category: data['category'],
+ matchedText: data['matched_text'],
+ message: data['message'],
+ replacements: data['replacements'],
+ span: data['span'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const errorsRequest = z.lazy(() => {
+ return z
+ .object({
+ category: z.string().nullish(),
+ matchedText: z.string().nullish(),
+ message: z.string().nullish(),
+ replacements: z.array(z.string()).nullish(),
+ span: z.array(z.number()).nullish(),
+ })
+ .transform((data) => ({
+ category: data['category'],
+ matched_text: data['matchedText'],
+ message: data['message'],
+ replacements: data['replacements'],
+ span: data['span'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/fluency-overall-metrics-1.ts b/src/services/v9-latest_/models/fluency-overall-metrics-1.ts
new file mode 100644
index 0000000..8bd1f89
--- /dev/null
+++ b/src/services/v9-latest_/models/fluency-overall-metrics-1.ts
@@ -0,0 +1,137 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const fluencyOverallMetrics1 = z.lazy(() => {
+ return z.object({
+ allPauseCount: z.number().optional(),
+ allPauseDuration: z.number().optional(),
+ allPauseList: z.array(z.array(z.number())).optional(),
+ articulationLength: z.number().optional(),
+ articulationRate: z.number().optional(),
+ correctSyllableCount: z.number().optional(),
+ correctWordCount: z.number().optional(),
+ duration: z.number().optional(),
+ maxLengthRun: z.number().optional(),
+ meanLengthRun: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speechRate: z.number().optional(),
+ syllableCorrectPerMinute: z.number().optional(),
+ syllableCount: z.number().optional(),
+ wordCorrectPerMinute: z.number().optional(),
+ wordCount: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {FluencyOverallMetrics1} fluencyOverallMetrics1
+ * @property {number}
+ * @property {number}
+ * @property {number[][]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number[]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type FluencyOverallMetrics1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencyOverallMetrics1Response = z.lazy(() => {
+ return z
+ .object({
+ all_pause_count: z.number().optional(),
+ all_pause_duration: z.number().optional(),
+ all_pause_list: z.array(z.array(z.number())).optional(),
+ articulation_length: z.number().optional(),
+ articulation_rate: z.number().optional(),
+ correct_syllable_count: z.number().optional(),
+ correct_word_count: z.number().optional(),
+ duration: z.number().optional(),
+ max_length_run: z.number().optional(),
+ mean_length_run: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speech_rate: z.number().optional(),
+ syllable_correct_per_minute: z.number().optional(),
+ syllable_count: z.number().optional(),
+ word_correct_per_minute: z.number().optional(),
+ word_count: z.number().optional(),
+ })
+ .transform((data) => ({
+ allPauseCount: data['all_pause_count'],
+ allPauseDuration: data['all_pause_duration'],
+ allPauseList: data['all_pause_list'],
+ articulationLength: data['articulation_length'],
+ articulationRate: data['articulation_rate'],
+ correctSyllableCount: data['correct_syllable_count'],
+ correctWordCount: data['correct_word_count'],
+ duration: data['duration'],
+ maxLengthRun: data['max_length_run'],
+ meanLengthRun: data['mean_length_run'],
+ segment: data['segment'],
+ speechRate: data['speech_rate'],
+ syllableCorrectPerMinute: data['syllable_correct_per_minute'],
+ syllableCount: data['syllable_count'],
+ wordCorrectPerMinute: data['word_correct_per_minute'],
+ wordCount: data['word_count'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencyOverallMetrics1Request = z.lazy(() => {
+ return z
+ .object({
+ allPauseCount: z.number().nullish(),
+ allPauseDuration: z.number().nullish(),
+ allPauseList: z.array(z.array(z.number())).nullish(),
+ articulationLength: z.number().nullish(),
+ articulationRate: z.number().nullish(),
+ correctSyllableCount: z.number().nullish(),
+ correctWordCount: z.number().nullish(),
+ duration: z.number().nullish(),
+ maxLengthRun: z.number().nullish(),
+ meanLengthRun: z.number().nullish(),
+ segment: z.array(z.number()).nullish(),
+ speechRate: z.number().nullish(),
+ syllableCorrectPerMinute: z.number().nullish(),
+ syllableCount: z.number().nullish(),
+ wordCorrectPerMinute: z.number().nullish(),
+ wordCount: z.number().nullish(),
+ })
+ .transform((data) => ({
+ all_pause_count: data['allPauseCount'],
+ all_pause_duration: data['allPauseDuration'],
+ all_pause_list: data['allPauseList'],
+ articulation_length: data['articulationLength'],
+ articulation_rate: data['articulationRate'],
+ correct_syllable_count: data['correctSyllableCount'],
+ correct_word_count: data['correctWordCount'],
+ duration: data['duration'],
+ max_length_run: data['maxLengthRun'],
+ mean_length_run: data['meanLengthRun'],
+ segment: data['segment'],
+ speech_rate: data['speechRate'],
+ syllable_correct_per_minute: data['syllableCorrectPerMinute'],
+ syllable_count: data['syllableCount'],
+ word_correct_per_minute: data['wordCorrectPerMinute'],
+ word_count: data['wordCount'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/fluency-overall-metrics-2.ts b/src/services/v9-latest_/models/fluency-overall-metrics-2.ts
new file mode 100644
index 0000000..86269dd
--- /dev/null
+++ b/src/services/v9-latest_/models/fluency-overall-metrics-2.ts
@@ -0,0 +1,143 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const fluencyOverallMetrics2 = z.lazy(() => {
+ return z.object({
+ allPauseCount: z.number().optional(),
+ allPauseDuration: z.number().optional(),
+ allPauseList: z.array(z.array(z.number())).optional(),
+ articulationLength: z.number().optional(),
+ articulationRate: z.number().optional(),
+ correctSyllableCount: z.number().optional(),
+ correctWordCount: z.number().optional(),
+ duration: z.number().optional(),
+ fluencyScore: z.number().optional(),
+ maxLengthRun: z.number().optional(),
+ meanLengthRun: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speechRate: z.number().optional(),
+ syllableCorrectPerMinute: z.number().optional(),
+ syllableCount: z.number().optional(),
+ wordCorrectPerMinute: z.number().optional(),
+ wordCount: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {FluencyOverallMetrics2} fluencyOverallMetrics2
+ * @property {number}
+ * @property {number}
+ * @property {number[][]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number[]}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type FluencyOverallMetrics2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencyOverallMetrics2Response = z.lazy(() => {
+ return z
+ .object({
+ all_pause_count: z.number().optional(),
+ all_pause_duration: z.number().optional(),
+ all_pause_list: z.array(z.array(z.number())).optional(),
+ articulation_length: z.number().optional(),
+ articulation_rate: z.number().optional(),
+ correct_syllable_count: z.number().optional(),
+ correct_word_count: z.number().optional(),
+ duration: z.number().optional(),
+ fluency_score: z.number().optional(),
+ max_length_run: z.number().optional(),
+ mean_length_run: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speech_rate: z.number().optional(),
+ syllable_correct_per_minute: z.number().optional(),
+ syllable_count: z.number().optional(),
+ word_correct_per_minute: z.number().optional(),
+ word_count: z.number().optional(),
+ })
+ .transform((data) => ({
+ allPauseCount: data['all_pause_count'],
+ allPauseDuration: data['all_pause_duration'],
+ allPauseList: data['all_pause_list'],
+ articulationLength: data['articulation_length'],
+ articulationRate: data['articulation_rate'],
+ correctSyllableCount: data['correct_syllable_count'],
+ correctWordCount: data['correct_word_count'],
+ duration: data['duration'],
+ fluencyScore: data['fluency_score'],
+ maxLengthRun: data['max_length_run'],
+ meanLengthRun: data['mean_length_run'],
+ segment: data['segment'],
+ speechRate: data['speech_rate'],
+ syllableCorrectPerMinute: data['syllable_correct_per_minute'],
+ syllableCount: data['syllable_count'],
+ wordCorrectPerMinute: data['word_correct_per_minute'],
+ wordCount: data['word_count'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencyOverallMetrics2Request = z.lazy(() => {
+ return z
+ .object({
+ allPauseCount: z.number().nullish(),
+ allPauseDuration: z.number().nullish(),
+ allPauseList: z.array(z.array(z.number())).nullish(),
+ articulationLength: z.number().nullish(),
+ articulationRate: z.number().nullish(),
+ correctSyllableCount: z.number().nullish(),
+ correctWordCount: z.number().nullish(),
+ duration: z.number().nullish(),
+ fluencyScore: z.number().nullish(),
+ maxLengthRun: z.number().nullish(),
+ meanLengthRun: z.number().nullish(),
+ segment: z.array(z.number()).nullish(),
+ speechRate: z.number().nullish(),
+ syllableCorrectPerMinute: z.number().nullish(),
+ syllableCount: z.number().nullish(),
+ wordCorrectPerMinute: z.number().nullish(),
+ wordCount: z.number().nullish(),
+ })
+ .transform((data) => ({
+ all_pause_count: data['allPauseCount'],
+ all_pause_duration: data['allPauseDuration'],
+ all_pause_list: data['allPauseList'],
+ articulation_length: data['articulationLength'],
+ articulation_rate: data['articulationRate'],
+ correct_syllable_count: data['correctSyllableCount'],
+ correct_word_count: data['correctWordCount'],
+ duration: data['duration'],
+ fluency_score: data['fluencyScore'],
+ max_length_run: data['maxLengthRun'],
+ mean_length_run: data['meanLengthRun'],
+ segment: data['segment'],
+ speech_rate: data['speechRate'],
+ syllable_correct_per_minute: data['syllableCorrectPerMinute'],
+ syllable_count: data['syllableCount'],
+ word_correct_per_minute: data['wordCorrectPerMinute'],
+ word_count: data['wordCount'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/fluency-segment-metrics-list-1.ts b/src/services/v9-latest_/models/fluency-segment-metrics-list-1.ts
new file mode 100644
index 0000000..e3d27a4
--- /dev/null
+++ b/src/services/v9-latest_/models/fluency-segment-metrics-list-1.ts
@@ -0,0 +1,159 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ segmentMetricsListCefrScore1,
+ segmentMetricsListCefrScore1Request,
+ segmentMetricsListCefrScore1Response,
+} from './segment-metrics-list-cefr-score-1';
+import {
+ segmentMetricsListSpeechaceScore1,
+ segmentMetricsListSpeechaceScore1Request,
+ segmentMetricsListSpeechaceScore1Response,
+} from './segment-metrics-list-speechace-score-1';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const fluencySegmentMetricsList1 = z.lazy(() => {
+ return z.object({
+ allPauseCount: z.number().optional(),
+ allPauseDuration: z.number().optional(),
+ allPauseList: z.array(z.array(z.number())).optional(),
+ articulationLength: z.number().optional(),
+ articulationRate: z.number().optional(),
+ cefrScore: segmentMetricsListCefrScore1.optional(),
+ correctSyllableCount: z.number().optional(),
+ correctWordCount: z.number().optional(),
+ duration: z.number().optional(),
+ maxLengthRun: z.number().optional(),
+ meanLengthRun: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speechRate: z.number().optional(),
+ speechaceScore: segmentMetricsListSpeechaceScore1.optional(),
+ syllableCorrectPerMinute: z.number().optional(),
+ syllableCount: z.number().optional(),
+ wordCorrectPerMinute: z.number().optional(),
+ wordCount: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {FluencySegmentMetricsList1} fluencySegmentMetricsList1
+ * @property {number}
+ * @property {number}
+ * @property {number[][]}
+ * @property {number}
+ * @property {number}
+ * @property {SegmentMetricsListCefrScore1}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number[]}
+ * @property {number}
+ * @property {SegmentMetricsListSpeechaceScore1}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type FluencySegmentMetricsList1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencySegmentMetricsList1Response = z.lazy(() => {
+ return z
+ .object({
+ all_pause_count: z.number().optional(),
+ all_pause_duration: z.number().optional(),
+ all_pause_list: z.array(z.array(z.number())).optional(),
+ articulation_length: z.number().optional(),
+ articulation_rate: z.number().optional(),
+ cefr_score: segmentMetricsListCefrScore1Response.optional(),
+ correct_syllable_count: z.number().optional(),
+ correct_word_count: z.number().optional(),
+ duration: z.number().optional(),
+ max_length_run: z.number().optional(),
+ mean_length_run: z.number().optional(),
+ segment: z.array(z.number()).optional(),
+ speech_rate: z.number().optional(),
+ speechace_score: segmentMetricsListSpeechaceScore1Response.optional(),
+ syllable_correct_per_minute: z.number().optional(),
+ syllable_count: z.number().optional(),
+ word_correct_per_minute: z.number().optional(),
+ word_count: z.number().optional(),
+ })
+ .transform((data) => ({
+ allPauseCount: data['all_pause_count'],
+ allPauseDuration: data['all_pause_duration'],
+ allPauseList: data['all_pause_list'],
+ articulationLength: data['articulation_length'],
+ articulationRate: data['articulation_rate'],
+ cefrScore: data['cefr_score'],
+ correctSyllableCount: data['correct_syllable_count'],
+ correctWordCount: data['correct_word_count'],
+ duration: data['duration'],
+ maxLengthRun: data['max_length_run'],
+ meanLengthRun: data['mean_length_run'],
+ segment: data['segment'],
+ speechRate: data['speech_rate'],
+ speechaceScore: data['speechace_score'],
+ syllableCorrectPerMinute: data['syllable_correct_per_minute'],
+ syllableCount: data['syllable_count'],
+ wordCorrectPerMinute: data['word_correct_per_minute'],
+ wordCount: data['word_count'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencySegmentMetricsList1Request = z.lazy(() => {
+ return z
+ .object({
+ allPauseCount: z.number().nullish(),
+ allPauseDuration: z.number().nullish(),
+ allPauseList: z.array(z.array(z.number())).nullish(),
+ articulationLength: z.number().nullish(),
+ articulationRate: z.number().nullish(),
+ cefrScore: segmentMetricsListCefrScore1Request.nullish(),
+ correctSyllableCount: z.number().nullish(),
+ correctWordCount: z.number().nullish(),
+ duration: z.number().nullish(),
+ maxLengthRun: z.number().nullish(),
+ meanLengthRun: z.number().nullish(),
+ segment: z.array(z.number()).nullish(),
+ speechRate: z.number().nullish(),
+ speechaceScore: segmentMetricsListSpeechaceScore1Request.nullish(),
+ syllableCorrectPerMinute: z.number().nullish(),
+ syllableCount: z.number().nullish(),
+ wordCorrectPerMinute: z.number().nullish(),
+ wordCount: z.number().nullish(),
+ })
+ .transform((data) => ({
+ all_pause_count: data['allPauseCount'],
+ all_pause_duration: data['allPauseDuration'],
+ all_pause_list: data['allPauseList'],
+ articulation_length: data['articulationLength'],
+ articulation_rate: data['articulationRate'],
+ cefr_score: data['cefrScore'],
+ correct_syllable_count: data['correctSyllableCount'],
+ correct_word_count: data['correctWordCount'],
+ duration: data['duration'],
+ max_length_run: data['maxLengthRun'],
+ mean_length_run: data['meanLengthRun'],
+ segment: data['segment'],
+ speech_rate: data['speechRate'],
+ speechace_score: data['speechaceScore'],
+ syllable_correct_per_minute: data['syllableCorrectPerMinute'],
+ syllable_count: data['syllableCount'],
+ word_correct_per_minute: data['wordCorrectPerMinute'],
+ word_count: data['wordCount'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/fluency-segment-metrics-list-2.ts b/src/services/v9-latest_/models/fluency-segment-metrics-list-2.ts
new file mode 100644
index 0000000..6b2a82c
--- /dev/null
+++ b/src/services/v9-latest_/models/fluency-segment-metrics-list-2.ts
@@ -0,0 +1,192 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ segmentMetricsListCefrScore2,
+ segmentMetricsListCefrScore2Request,
+ segmentMetricsListCefrScore2Response,
+} from './segment-metrics-list-cefr-score-2';
+import {
+ segmentMetricsListIeltsScore,
+ segmentMetricsListIeltsScoreRequest,
+ segmentMetricsListIeltsScoreResponse,
+} from './segment-metrics-list-ielts-score';
+import {
+ segmentMetricsListPteScore,
+ segmentMetricsListPteScoreRequest,
+ segmentMetricsListPteScoreResponse,
+} from './segment-metrics-list-pte-score';
+import {
+ segmentMetricsListSpeechaceScore2,
+ segmentMetricsListSpeechaceScore2Request,
+ segmentMetricsListSpeechaceScore2Response,
+} from './segment-metrics-list-speechace-score-2';
+import {
+ segmentMetricsListToeicScore,
+ segmentMetricsListToeicScoreRequest,
+ segmentMetricsListToeicScoreResponse,
+} from './segment-metrics-list-toeic-score';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const fluencySegmentMetricsList2 = z.lazy(() => {
+ return z.object({
+ allPauseCount: z.number().optional(),
+ allPauseDuration: z.number().optional(),
+ allPauseList: z.array(z.array(z.number())).optional(),
+ articulationLength: z.number().optional(),
+ articulationRate: z.number().optional(),
+ cefrScore: segmentMetricsListCefrScore2.optional(),
+ correctSyllableCount: z.number().optional(),
+ correctWordCount: z.number().optional(),
+ duration: z.number().optional(),
+ ieltsScore: segmentMetricsListIeltsScore.optional(),
+ maxLengthRun: z.number().optional(),
+ meanLengthRun: z.number().optional(),
+ pteScore: segmentMetricsListPteScore.optional(),
+ segment: z.array(z.number()).optional(),
+ speechRate: z.number().optional(),
+ speechaceScore: segmentMetricsListSpeechaceScore2.optional(),
+ syllableCorrectPerMinute: z.number().optional(),
+ syllableCount: z.number().optional(),
+ toeicScore: segmentMetricsListToeicScore.optional(),
+ wordCorrectPerMinute: z.number().optional(),
+ wordCount: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {FluencySegmentMetricsList2} fluencySegmentMetricsList2
+ * @property {number}
+ * @property {number}
+ * @property {number[][]}
+ * @property {number}
+ * @property {number}
+ * @property {SegmentMetricsListCefrScore2}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {SegmentMetricsListIeltsScore}
+ * @property {number}
+ * @property {number}
+ * @property {SegmentMetricsListPteScore}
+ * @property {number[]}
+ * @property {number}
+ * @property {SegmentMetricsListSpeechaceScore2}
+ * @property {number}
+ * @property {number}
+ * @property {SegmentMetricsListToeicScore}
+ * @property {number}
+ * @property {number}
+ */
+export type FluencySegmentMetricsList2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencySegmentMetricsList2Response = z.lazy(() => {
+ return z
+ .object({
+ all_pause_count: z.number().optional(),
+ all_pause_duration: z.number().optional(),
+ all_pause_list: z.array(z.array(z.number())).optional(),
+ articulation_length: z.number().optional(),
+ articulation_rate: z.number().optional(),
+ cefr_score: segmentMetricsListCefrScore2Response.optional(),
+ correct_syllable_count: z.number().optional(),
+ correct_word_count: z.number().optional(),
+ duration: z.number().optional(),
+ ielts_score: segmentMetricsListIeltsScoreResponse.optional(),
+ max_length_run: z.number().optional(),
+ mean_length_run: z.number().optional(),
+ pte_score: segmentMetricsListPteScoreResponse.optional(),
+ segment: z.array(z.number()).optional(),
+ speech_rate: z.number().optional(),
+ speechace_score: segmentMetricsListSpeechaceScore2Response.optional(),
+ syllable_correct_per_minute: z.number().optional(),
+ syllable_count: z.number().optional(),
+ toeic_score: segmentMetricsListToeicScoreResponse.optional(),
+ word_correct_per_minute: z.number().optional(),
+ word_count: z.number().optional(),
+ })
+ .transform((data) => ({
+ allPauseCount: data['all_pause_count'],
+ allPauseDuration: data['all_pause_duration'],
+ allPauseList: data['all_pause_list'],
+ articulationLength: data['articulation_length'],
+ articulationRate: data['articulation_rate'],
+ cefrScore: data['cefr_score'],
+ correctSyllableCount: data['correct_syllable_count'],
+ correctWordCount: data['correct_word_count'],
+ duration: data['duration'],
+ ieltsScore: data['ielts_score'],
+ maxLengthRun: data['max_length_run'],
+ meanLengthRun: data['mean_length_run'],
+ pteScore: data['pte_score'],
+ segment: data['segment'],
+ speechRate: data['speech_rate'],
+ speechaceScore: data['speechace_score'],
+ syllableCorrectPerMinute: data['syllable_correct_per_minute'],
+ syllableCount: data['syllable_count'],
+ toeicScore: data['toeic_score'],
+ wordCorrectPerMinute: data['word_correct_per_minute'],
+ wordCount: data['word_count'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const fluencySegmentMetricsList2Request = z.lazy(() => {
+ return z
+ .object({
+ allPauseCount: z.number().nullish(),
+ allPauseDuration: z.number().nullish(),
+ allPauseList: z.array(z.array(z.number())).nullish(),
+ articulationLength: z.number().nullish(),
+ articulationRate: z.number().nullish(),
+ cefrScore: segmentMetricsListCefrScore2Request.nullish(),
+ correctSyllableCount: z.number().nullish(),
+ correctWordCount: z.number().nullish(),
+ duration: z.number().nullish(),
+ ieltsScore: segmentMetricsListIeltsScoreRequest.nullish(),
+ maxLengthRun: z.number().nullish(),
+ meanLengthRun: z.number().nullish(),
+ pteScore: segmentMetricsListPteScoreRequest.nullish(),
+ segment: z.array(z.number()).nullish(),
+ speechRate: z.number().nullish(),
+ speechaceScore: segmentMetricsListSpeechaceScore2Request.nullish(),
+ syllableCorrectPerMinute: z.number().nullish(),
+ syllableCount: z.number().nullish(),
+ toeicScore: segmentMetricsListToeicScoreRequest.nullish(),
+ wordCorrectPerMinute: z.number().nullish(),
+ wordCount: z.number().nullish(),
+ })
+ .transform((data) => ({
+ all_pause_count: data['allPauseCount'],
+ all_pause_duration: data['allPauseDuration'],
+ all_pause_list: data['allPauseList'],
+ articulation_length: data['articulationLength'],
+ articulation_rate: data['articulationRate'],
+ cefr_score: data['cefrScore'],
+ correct_syllable_count: data['correctSyllableCount'],
+ correct_word_count: data['correctWordCount'],
+ duration: data['duration'],
+ ielts_score: data['ieltsScore'],
+ max_length_run: data['maxLengthRun'],
+ mean_length_run: data['meanLengthRun'],
+ pte_score: data['pteScore'],
+ segment: data['segment'],
+ speech_rate: data['speechRate'],
+ speechace_score: data['speechaceScore'],
+ syllable_correct_per_minute: data['syllableCorrectPerMinute'],
+ syllable_count: data['syllableCount'],
+ toeic_score: data['toeicScore'],
+ word_correct_per_minute: data['wordCorrectPerMinute'],
+ word_count: data['wordCount'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/grammar-overall-metrics.ts b/src/services/v9-latest_/models/grammar-overall-metrics.ts
new file mode 100644
index 0000000..f600511
--- /dev/null
+++ b/src/services/v9-latest_/models/grammar-overall-metrics.ts
@@ -0,0 +1,73 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import { grammaticalAccuracy, grammaticalAccuracyRequest, grammaticalAccuracyResponse } from './grammatical-accuracy';
+import { grammaticalRange, grammaticalRangeRequest, grammaticalRangeResponse } from './grammatical-range';
+import { length, lengthRequest, lengthResponse } from './length';
+import {
+ overallMetricsLexicalDiversity1,
+ overallMetricsLexicalDiversity1Request,
+ overallMetricsLexicalDiversity1Response,
+} from './overall-metrics-lexical-diversity-1';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const grammarOverallMetrics = z.lazy(() => {
+ return z.object({
+ grammaticalAccuracy: grammaticalAccuracy.optional(),
+ grammaticalRange: grammaticalRange.optional(),
+ length: length.optional(),
+ lexicalDiversity: overallMetricsLexicalDiversity1.optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {GrammarOverallMetrics} grammarOverallMetrics
+ * @property {GrammaticalAccuracy}
+ * @property {GrammaticalRange}
+ * @property {Length}
+ * @property {OverallMetricsLexicalDiversity1}
+ */
+export type GrammarOverallMetrics = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const grammarOverallMetricsResponse = z.lazy(() => {
+ return z
+ .object({
+ grammatical_accuracy: grammaticalAccuracyResponse.optional(),
+ grammatical_range: grammaticalRangeResponse.optional(),
+ length: lengthResponse.optional(),
+ lexical_diversity: overallMetricsLexicalDiversity1Response.optional(),
+ })
+ .transform((data) => ({
+ grammaticalAccuracy: data['grammatical_accuracy'],
+ grammaticalRange: data['grammatical_range'],
+ length: data['length'],
+ lexicalDiversity: data['lexical_diversity'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const grammarOverallMetricsRequest = z.lazy(() => {
+ return z
+ .object({
+ grammaticalAccuracy: grammaticalAccuracyRequest.nullish(),
+ grammaticalRange: grammaticalRangeRequest.nullish(),
+ length: lengthRequest.nullish(),
+ lexicalDiversity: overallMetricsLexicalDiversity1Request.nullish(),
+ })
+ .transform((data) => ({
+ grammatical_accuracy: data['grammaticalAccuracy'],
+ grammatical_range: data['grammaticalRange'],
+ length: data['length'],
+ lexical_diversity: data['lexicalDiversity'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/grammar.ts b/src/services/v9-latest_/models/grammar.ts
new file mode 100644
index 0000000..2645f92
--- /dev/null
+++ b/src/services/v9-latest_/models/grammar.ts
@@ -0,0 +1,56 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import { errors, errorsRequest, errorsResponse } from './errors';
+import {
+ grammarOverallMetrics,
+ grammarOverallMetricsRequest,
+ grammarOverallMetricsResponse,
+} from './grammar-overall-metrics';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const grammar = z.lazy(() => {
+ return z.object({
+ errors: z.array(errors).optional(),
+ overallMetrics: grammarOverallMetrics.optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {Grammar} grammar
+ * @property {Errors[]}
+ * @property {GrammarOverallMetrics}
+ */
+export type Grammar = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const grammarResponse = z.lazy(() => {
+ return z
+ .object({
+ errors: z.array(errorsResponse).optional(),
+ overall_metrics: grammarOverallMetricsResponse.optional(),
+ })
+ .transform((data) => ({
+ errors: data['errors'],
+ overallMetrics: data['overall_metrics'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const grammarRequest = z.lazy(() => {
+ return z
+ .object({ errors: z.array(errorsRequest).nullish(), overallMetrics: grammarOverallMetricsRequest.nullish() })
+ .transform((data) => ({
+ errors: data['errors'],
+ overall_metrics: data['overallMetrics'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/grammatical-accuracy.ts b/src/services/v9-latest_/models/grammatical-accuracy.ts
new file mode 100644
index 0000000..b06e996
--- /dev/null
+++ b/src/services/v9-latest_/models/grammatical-accuracy.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const grammaticalAccuracy = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {GrammaticalAccuracy} grammaticalAccuracy
+ * @property {string}
+ * @property {number}
+ */
+export type GrammaticalAccuracy = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const grammaticalAccuracyResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const grammaticalAccuracyRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/grammatical-range.ts b/src/services/v9-latest_/models/grammatical-range.ts
new file mode 100644
index 0000000..84df60f
--- /dev/null
+++ b/src/services/v9-latest_/models/grammatical-range.ts
@@ -0,0 +1,99 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ adverbModifierVariation,
+ adverbModifierVariationRequest,
+ adverbModifierVariationResponse,
+} from './adverb-modifier-variation';
+import {
+ nounPhraseComplexity,
+ nounPhraseComplexityRequest,
+ nounPhraseComplexityResponse,
+} from './noun-phrase-complexity';
+import { nounPhraseVariation, nounPhraseVariationRequest, nounPhraseVariationResponse } from './noun-phrase-variation';
+import {
+ verbConstructionVariation,
+ verbConstructionVariationRequest,
+ verbConstructionVariationResponse,
+} from './verb-construction-variation';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const grammaticalRange = z.lazy(() => {
+ return z.object({
+ adverbModifierVariation: adverbModifierVariation.optional(),
+ level: z.string().optional(),
+ message: z.string().optional(),
+ nounPhraseComplexity: nounPhraseComplexity.optional(),
+ nounPhraseVariation: nounPhraseVariation.optional(),
+ score: z.number().optional(),
+ verbConstructionVariation: verbConstructionVariation.optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {GrammaticalRange} grammaticalRange
+ * @property {AdverbModifierVariation}
+ * @property {string}
+ * @property {string}
+ * @property {NounPhraseComplexity}
+ * @property {NounPhraseVariation}
+ * @property {number}
+ * @property {VerbConstructionVariation}
+ */
+export type GrammaticalRange = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const grammaticalRangeResponse = z.lazy(() => {
+ return z
+ .object({
+ adverb_modifier_variation: adverbModifierVariationResponse.optional(),
+ level: z.string().optional(),
+ message: z.string().optional(),
+ noun_phrase_complexity: nounPhraseComplexityResponse.optional(),
+ noun_phrase_variation: nounPhraseVariationResponse.optional(),
+ score: z.number().optional(),
+ verb_construction_variation: verbConstructionVariationResponse.optional(),
+ })
+ .transform((data) => ({
+ adverbModifierVariation: data['adverb_modifier_variation'],
+ level: data['level'],
+ message: data['message'],
+ nounPhraseComplexity: data['noun_phrase_complexity'],
+ nounPhraseVariation: data['noun_phrase_variation'],
+ score: data['score'],
+ verbConstructionVariation: data['verb_construction_variation'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const grammaticalRangeRequest = z.lazy(() => {
+ return z
+ .object({
+ adverbModifierVariation: adverbModifierVariationRequest.nullish(),
+ level: z.string().nullish(),
+ message: z.string().nullish(),
+ nounPhraseComplexity: nounPhraseComplexityRequest.nullish(),
+ nounPhraseVariation: nounPhraseVariationRequest.nullish(),
+ score: z.number().nullish(),
+ verbConstructionVariation: verbConstructionVariationRequest.nullish(),
+ })
+ .transform((data) => ({
+ adverb_modifier_variation: data['adverbModifierVariation'],
+ level: data['level'],
+ message: data['message'],
+ noun_phrase_complexity: data['nounPhraseComplexity'],
+ noun_phrase_variation: data['nounPhraseVariation'],
+ score: data['score'],
+ verb_construction_variation: data['verbConstructionVariation'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/idiomaticity.ts b/src/services/v9-latest_/models/idiomaticity.ts
new file mode 100644
index 0000000..98dce8f
--- /dev/null
+++ b/src/services/v9-latest_/models/idiomaticity.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const idiomaticity = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {Idiomaticity} idiomaticity
+ * @property {string}
+ * @property {number}
+ */
+export type Idiomaticity = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const idiomaticityResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const idiomaticityRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/index.ts b/src/services/v9-latest_/models/index.ts
new file mode 100644
index 0000000..4b25743
--- /dev/null
+++ b/src/services/v9-latest_/models/index.ts
@@ -0,0 +1,73 @@
+// This file was generated by liblab | https://liblab.com/
+
+export * from './score-a-word-or-sentence-request';
+export * from './score-a-word-or-sentence-ok-response';
+export * from './score-a-phoneme-list-request';
+export * from './score-a-phoneme-list-ok-response';
+export * from './validate-text-ok-response';
+export * from './score-task-request';
+export * from './transcribe-score-request';
+export * from './transcribe-score-ok-response';
+export * from './score-a-word-or-sentence-ok-response-text-score';
+export * from './text-score-cefr-score';
+export * from './text-score-fluency-1';
+export * from './text-score-ielts-score';
+export * from './text-score-pte-score';
+export * from './text-score-speechace-score';
+export * from './text-score-toeic-score';
+export * from './text-score-word-score-list-1';
+export * from './fluency-overall-metrics-1';
+export * from './fluency-segment-metrics-list-1';
+export * from './segment-metrics-list-cefr-score-1';
+export * from './segment-metrics-list-speechace-score-1';
+export * from './word-score-list-phone-score-list-1';
+export * from './word-score-list-syllable-score-list-1';
+export * from './score-a-phoneme-list-ok-response-word-score';
+export * from './word-score-phone-score-list-1';
+export * from './transcribe-score-ok-response-speech-score';
+export * from './speech-score-cefr-score';
+export * from './coherence';
+export * from './speech-score-fluency-1';
+export * from './grammar';
+export * from './speech-score-ielts-score';
+export * from './speech-score-pte-score';
+export * from './speech-score-relevance-1';
+export * from './score-issue-list';
+export * from './speech-score-speechace-score';
+export * from './speech-score-toeic-score';
+export * from './vocab';
+export * from './speech-score-word-score-list-1';
+export * from './coherence-overall-metrics';
+export * from './adverb-diversity';
+export * from './basic-connectives';
+export * from './causal-connectives';
+export * from './lexical-density';
+export * from './negative-connectives';
+export * from './pronoun-density';
+export * from './verb-diversity';
+export * from './fluency-overall-metrics-2';
+export * from './fluency-segment-metrics-list-2';
+export * from './segment-metrics-list-cefr-score-2';
+export * from './segment-metrics-list-ielts-score';
+export * from './segment-metrics-list-pte-score';
+export * from './segment-metrics-list-speechace-score-2';
+export * from './segment-metrics-list-toeic-score';
+export * from './errors';
+export * from './grammar-overall-metrics';
+export * from './grammatical-accuracy';
+export * from './grammatical-range';
+export * from './length';
+export * from './overall-metrics-lexical-diversity-1';
+export * from './adverb-modifier-variation';
+export * from './noun-phrase-complexity';
+export * from './noun-phrase-variation';
+export * from './verb-construction-variation';
+export * from './vocab-overall-metrics';
+export * from './academic-language-use';
+export * from './collocation-commonality';
+export * from './idiomaticity';
+export * from './overall-metrics-lexical-diversity-2';
+export * from './word-sophistication';
+export * from './word-specificity';
+export * from './word-score-list-phone-score-list-2';
+export * from './word-score-list-syllable-score-list-2';
diff --git a/src/services/v9-latest_/models/length.ts b/src/services/v9-latest_/models/length.ts
new file mode 100644
index 0000000..75d9cc1
--- /dev/null
+++ b/src/services/v9-latest_/models/length.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const length = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {Length} length
+ * @property {string}
+ * @property {number}
+ */
+export type Length = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const lengthResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const lengthRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/lexical-density.ts b/src/services/v9-latest_/models/lexical-density.ts
new file mode 100644
index 0000000..8b6903b
--- /dev/null
+++ b/src/services/v9-latest_/models/lexical-density.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const lexicalDensity = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {LexicalDensity} lexicalDensity
+ * @property {string}
+ * @property {number}
+ */
+export type LexicalDensity = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const lexicalDensityResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const lexicalDensityRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/negative-connectives.ts b/src/services/v9-latest_/models/negative-connectives.ts
new file mode 100644
index 0000000..9098ae3
--- /dev/null
+++ b/src/services/v9-latest_/models/negative-connectives.ts
@@ -0,0 +1,65 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const negativeConnectives = z.lazy(() => {
+ return z.object({
+ examples: z.array(z.string()).optional(),
+ level: z.string().optional(),
+ message: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {NegativeConnectives} negativeConnectives
+ * @property {string[]}
+ * @property {string}
+ * @property {string}
+ * @property {number}
+ */
+export type NegativeConnectives = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const negativeConnectivesResponse = z.lazy(() => {
+ return z
+ .object({
+ examples: z.array(z.string()).optional(),
+ level: z.string().optional(),
+ message: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ examples: data['examples'],
+ level: data['level'],
+ message: data['message'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const negativeConnectivesRequest = z.lazy(() => {
+ return z
+ .object({
+ examples: z.array(z.string()).nullish(),
+ level: z.string().nullish(),
+ message: z.string().nullish(),
+ score: z.number().nullish(),
+ })
+ .transform((data) => ({
+ examples: data['examples'],
+ level: data['level'],
+ message: data['message'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/noun-phrase-complexity.ts b/src/services/v9-latest_/models/noun-phrase-complexity.ts
new file mode 100644
index 0000000..814bef9
--- /dev/null
+++ b/src/services/v9-latest_/models/noun-phrase-complexity.ts
@@ -0,0 +1,55 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const nounPhraseComplexity = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ message: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {NounPhraseComplexity} nounPhraseComplexity
+ * @property {string}
+ * @property {string}
+ * @property {number}
+ */
+export type NounPhraseComplexity = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const nounPhraseComplexityResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ message: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ message: data['message'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const nounPhraseComplexityRequest = z.lazy(() => {
+ return z
+ .object({ level: z.string().nullish(), message: z.string().nullish(), score: z.number().nullish() })
+ .transform((data) => ({
+ level: data['level'],
+ message: data['message'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/noun-phrase-variation.ts b/src/services/v9-latest_/models/noun-phrase-variation.ts
new file mode 100644
index 0000000..103e16d
--- /dev/null
+++ b/src/services/v9-latest_/models/noun-phrase-variation.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const nounPhraseVariation = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {NounPhraseVariation} nounPhraseVariation
+ * @property {string}
+ * @property {number}
+ */
+export type NounPhraseVariation = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const nounPhraseVariationResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const nounPhraseVariationRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/overall-metrics-lexical-diversity-1.ts b/src/services/v9-latest_/models/overall-metrics-lexical-diversity-1.ts
new file mode 100644
index 0000000..f2a5d09
--- /dev/null
+++ b/src/services/v9-latest_/models/overall-metrics-lexical-diversity-1.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const overallMetricsLexicalDiversity1 = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {OverallMetricsLexicalDiversity1} overallMetricsLexicalDiversity1
+ * @property {string}
+ * @property {number}
+ */
+export type OverallMetricsLexicalDiversity1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const overallMetricsLexicalDiversity1Response = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const overallMetricsLexicalDiversity1Request = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/overall-metrics-lexical-diversity-2.ts b/src/services/v9-latest_/models/overall-metrics-lexical-diversity-2.ts
new file mode 100644
index 0000000..90f0329
--- /dev/null
+++ b/src/services/v9-latest_/models/overall-metrics-lexical-diversity-2.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const overallMetricsLexicalDiversity2 = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {OverallMetricsLexicalDiversity2} overallMetricsLexicalDiversity2
+ * @property {string}
+ * @property {number}
+ */
+export type OverallMetricsLexicalDiversity2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const overallMetricsLexicalDiversity2Response = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const overallMetricsLexicalDiversity2Request = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/pronoun-density.ts b/src/services/v9-latest_/models/pronoun-density.ts
new file mode 100644
index 0000000..6cc1a2f
--- /dev/null
+++ b/src/services/v9-latest_/models/pronoun-density.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const pronounDensity = z.lazy(() => {
+ return z.object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {PronounDensity} pronounDensity
+ * @property {string}
+ * @property {number}
+ */
+export type PronounDensity = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const pronounDensityResponse = z.lazy(() => {
+ return z
+ .object({
+ level: z.string().optional(),
+ score: z.number().optional(),
+ })
+ .transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const pronounDensityRequest = z.lazy(() => {
+ return z.object({ level: z.string().nullish(), score: z.number().nullish() }).transform((data) => ({
+ level: data['level'],
+ score: data['score'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/score-a-phoneme-list-ok-response-word-score.ts b/src/services/v9-latest_/models/score-a-phoneme-list-ok-response-word-score.ts
new file mode 100644
index 0000000..b954552
--- /dev/null
+++ b/src/services/v9-latest_/models/score-a-phoneme-list-ok-response-word-score.ts
@@ -0,0 +1,64 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ wordScorePhoneScoreList1,
+ wordScorePhoneScoreList1Request,
+ wordScorePhoneScoreList1Response,
+} from './word-score-phone-score-list-1';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAPhonemeListOkResponseWordScore = z.lazy(() => {
+ return z.object({
+ phoneScoreList: z.array(wordScorePhoneScoreList1).optional(),
+ qualityScore: z.number().optional(),
+ word: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAPhonemeListOkResponseWordScore} scoreAPhonemeListOkResponseWordScore
+ * @property {WordScorePhoneScoreList1[]}
+ * @property {number}
+ * @property {string}
+ */
+export type ScoreAPhonemeListOkResponseWordScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeListOkResponseWordScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ phone_score_list: z.array(wordScorePhoneScoreList1Response).optional(),
+ quality_score: z.number().optional(),
+ word: z.string().optional(),
+ })
+ .transform((data) => ({
+ phoneScoreList: data['phone_score_list'],
+ qualityScore: data['quality_score'],
+ word: data['word'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeListOkResponseWordScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ phoneScoreList: z.array(wordScorePhoneScoreList1Request).nullish(),
+ qualityScore: z.number().nullish(),
+ word: z.string().nullish(),
+ })
+ .transform((data) => ({
+ phone_score_list: data['phoneScoreList'],
+ quality_score: data['qualityScore'],
+ word: data['word'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/score-a-phoneme-list-ok-response.ts b/src/services/v9-latest_/models/score-a-phoneme-list-ok-response.ts
new file mode 100644
index 0000000..448041e
--- /dev/null
+++ b/src/services/v9-latest_/models/score-a-phoneme-list-ok-response.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ scoreAPhonemeListOkResponseWordScore,
+ scoreAPhonemeListOkResponseWordScoreRequest,
+ scoreAPhonemeListOkResponseWordScoreResponse,
+} from './score-a-phoneme-list-ok-response-word-score';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAPhonemeListOkResponse = z.lazy(() => {
+ return z.object({
+ quotaRemaining: z.number().optional(),
+ status: z.string().optional(),
+ version: z.string().optional(),
+ wordScore: scoreAPhonemeListOkResponseWordScore.optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAPhonemeListOkResponse} scoreAPhonemeListOkResponse
+ * @property {number}
+ * @property {string}
+ * @property {string}
+ * @property {ScoreAPhonemeListOkResponseWordScore}
+ */
+export type ScoreAPhonemeListOkResponse = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeListOkResponseResponse = z.lazy(() => {
+ return z
+ .object({
+ quota_remaining: z.number().optional(),
+ status: z.string().optional(),
+ version: z.string().optional(),
+ word_score: scoreAPhonemeListOkResponseWordScoreResponse.optional(),
+ })
+ .transform((data) => ({
+ quotaRemaining: data['quota_remaining'],
+ status: data['status'],
+ version: data['version'],
+ wordScore: data['word_score'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeListOkResponseRequest = z.lazy(() => {
+ return z
+ .object({
+ quotaRemaining: z.number().nullish(),
+ status: z.string().nullish(),
+ version: z.string().nullish(),
+ wordScore: scoreAPhonemeListOkResponseWordScoreRequest.nullish(),
+ })
+ .transform((data) => ({
+ quota_remaining: data['quotaRemaining'],
+ status: data['status'],
+ version: data['version'],
+ word_score: data['wordScore'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/score-a-phoneme-list-request.ts b/src/services/v9-latest_/models/score-a-phoneme-list-request.ts
new file mode 100644
index 0000000..1b9d432
--- /dev/null
+++ b/src/services/v9-latest_/models/score-a-phoneme-list-request.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAPhonemeListRequest = z.lazy(() => {
+ return z.object({
+ phoneList: z.string().optional(),
+ questionInfo: z.string().optional(),
+ userAudioFile: z.instanceof(ArrayBuffer).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAPhonemeListRequest} scoreAPhonemeListRequest
+ * @property {string} - A phoneme list to score.
+ * @property {string} - A unique identifier for the activity or question this user audio is answering.
+
+Structure this field to include as much info as possible to aid in reporting and analytics.
+
+For example: **question_info='u1/q1'** where:
+
+* u1: means the question belongs to Unit 1 in your content
+* q1: means this is question 1 within the unit
+
+You can add more levels as needed.
+
+Ensure **no personally identifiable information** is passed in this field.
+ * @property {ArrayBuffer} - file with user audio (wav, mp3, m4a, webm, ogg, aiff)
+ */
+export type ScoreAPhonemeListRequest = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeListRequestResponse = z.lazy(() => {
+ return z
+ .object({
+ phone_list: z.string().optional(),
+ question_info: z.string().optional(),
+ user_audio_file: z.instanceof(ArrayBuffer).optional(),
+ })
+ .transform((data) => ({
+ phoneList: data['phone_list'],
+ questionInfo: data['question_info'],
+ userAudioFile: data['user_audio_file'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAPhonemeListRequestRequest = z.lazy(() => {
+ return z
+ .object({
+ phoneList: z.string().nullish(),
+ questionInfo: z.string().nullish(),
+ userAudioFile: z.instanceof(ArrayBuffer).nullish(),
+ })
+ .transform((data) => ({
+ phone_list: data['phoneList'],
+ question_info: data['questionInfo'],
+ user_audio_file: data['userAudioFile'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/score-a-word-or-sentence-ok-response-text-score.ts b/src/services/v9-latest_/models/score-a-word-or-sentence-ok-response-text-score.ts
new file mode 100644
index 0000000..4bb18bc
--- /dev/null
+++ b/src/services/v9-latest_/models/score-a-word-or-sentence-ok-response-text-score.ts
@@ -0,0 +1,104 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import { textScoreCefrScore, textScoreCefrScoreRequest, textScoreCefrScoreResponse } from './text-score-cefr-score';
+import { textScoreFluency1, textScoreFluency1Request, textScoreFluency1Response } from './text-score-fluency-1';
+import { textScoreIeltsScore, textScoreIeltsScoreRequest, textScoreIeltsScoreResponse } from './text-score-ielts-score';
+import { textScorePteScore, textScorePteScoreRequest, textScorePteScoreResponse } from './text-score-pte-score';
+import {
+ textScoreSpeechaceScore,
+ textScoreSpeechaceScoreRequest,
+ textScoreSpeechaceScoreResponse,
+} from './text-score-speechace-score';
+import { textScoreToeicScore, textScoreToeicScoreRequest, textScoreToeicScoreResponse } from './text-score-toeic-score';
+import {
+ textScoreWordScoreList1,
+ textScoreWordScoreList1Request,
+ textScoreWordScoreList1Response,
+} from './text-score-word-score-list-1';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAWordOrSentenceOkResponseTextScore = z.lazy(() => {
+ return z.object({
+ cefrScore: textScoreCefrScore.optional(),
+ fluency: textScoreFluency1.optional(),
+ ieltsScore: textScoreIeltsScore.optional(),
+ pteScore: textScorePteScore.optional(),
+ speechaceScore: textScoreSpeechaceScore.optional(),
+ text: z.string().optional(),
+ toeicScore: textScoreToeicScore.optional(),
+ wordScoreList: z.array(textScoreWordScoreList1).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAWordOrSentenceOkResponseTextScore} scoreAWordOrSentenceOkResponseTextScore
+ * @property {TextScoreCefrScore}
+ * @property {TextScoreFluency1}
+ * @property {TextScoreIeltsScore}
+ * @property {TextScorePteScore}
+ * @property {TextScoreSpeechaceScore}
+ * @property {string}
+ * @property {TextScoreToeicScore}
+ * @property {TextScoreWordScoreList1[]}
+ */
+export type ScoreAWordOrSentenceOkResponseTextScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentenceOkResponseTextScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ cefr_score: textScoreCefrScoreResponse.optional(),
+ fluency: textScoreFluency1Response.optional(),
+ ielts_score: textScoreIeltsScoreResponse.optional(),
+ pte_score: textScorePteScoreResponse.optional(),
+ speechace_score: textScoreSpeechaceScoreResponse.optional(),
+ text: z.string().optional(),
+ toeic_score: textScoreToeicScoreResponse.optional(),
+ word_score_list: z.array(textScoreWordScoreList1Response).optional(),
+ })
+ .transform((data) => ({
+ cefrScore: data['cefr_score'],
+ fluency: data['fluency'],
+ ieltsScore: data['ielts_score'],
+ pteScore: data['pte_score'],
+ speechaceScore: data['speechace_score'],
+ text: data['text'],
+ toeicScore: data['toeic_score'],
+ wordScoreList: data['word_score_list'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentenceOkResponseTextScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ cefrScore: textScoreCefrScoreRequest.nullish(),
+ fluency: textScoreFluency1Request.nullish(),
+ ieltsScore: textScoreIeltsScoreRequest.nullish(),
+ pteScore: textScorePteScoreRequest.nullish(),
+ speechaceScore: textScoreSpeechaceScoreRequest.nullish(),
+ text: z.string().nullish(),
+ toeicScore: textScoreToeicScoreRequest.nullish(),
+ wordScoreList: z.array(textScoreWordScoreList1Request).nullish(),
+ })
+ .transform((data) => ({
+ cefr_score: data['cefrScore'],
+ fluency: data['fluency'],
+ ielts_score: data['ieltsScore'],
+ pte_score: data['pteScore'],
+ speechace_score: data['speechaceScore'],
+ text: data['text'],
+ toeic_score: data['toeicScore'],
+ word_score_list: data['wordScoreList'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/score-a-word-or-sentence-ok-response.ts b/src/services/v9-latest_/models/score-a-word-or-sentence-ok-response.ts
new file mode 100644
index 0000000..24317ed
--- /dev/null
+++ b/src/services/v9-latest_/models/score-a-word-or-sentence-ok-response.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ scoreAWordOrSentenceOkResponseTextScore,
+ scoreAWordOrSentenceOkResponseTextScoreRequest,
+ scoreAWordOrSentenceOkResponseTextScoreResponse,
+} from './score-a-word-or-sentence-ok-response-text-score';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAWordOrSentenceOkResponse = z.lazy(() => {
+ return z.object({
+ quotaRemaining: z.number().optional(),
+ status: z.string().optional(),
+ textScore: scoreAWordOrSentenceOkResponseTextScore.optional(),
+ version: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAWordOrSentenceOkResponse} scoreAWordOrSentenceOkResponse
+ * @property {number}
+ * @property {string}
+ * @property {ScoreAWordOrSentenceOkResponseTextScore}
+ * @property {string}
+ */
+export type ScoreAWordOrSentenceOkResponse = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentenceOkResponseResponse = z.lazy(() => {
+ return z
+ .object({
+ quota_remaining: z.number().optional(),
+ status: z.string().optional(),
+ text_score: scoreAWordOrSentenceOkResponseTextScoreResponse.optional(),
+ version: z.string().optional(),
+ })
+ .transform((data) => ({
+ quotaRemaining: data['quota_remaining'],
+ status: data['status'],
+ textScore: data['text_score'],
+ version: data['version'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentenceOkResponseRequest = z.lazy(() => {
+ return z
+ .object({
+ quotaRemaining: z.number().nullish(),
+ status: z.string().nullish(),
+ textScore: scoreAWordOrSentenceOkResponseTextScoreRequest.nullish(),
+ version: z.string().nullish(),
+ })
+ .transform((data) => ({
+ quota_remaining: data['quotaRemaining'],
+ status: data['status'],
+ text_score: data['textScore'],
+ version: data['version'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/score-a-word-or-sentence-request.ts b/src/services/v9-latest_/models/score-a-word-or-sentence-request.ts
new file mode 100644
index 0000000..a45254e
--- /dev/null
+++ b/src/services/v9-latest_/models/score-a-word-or-sentence-request.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreAWordOrSentenceRequest = z.lazy(() => {
+ return z.object({
+ includeFluency: z.string().optional(),
+ includeUnknownWords: z.string().optional(),
+ noMc: z.string().optional(),
+ text: z.string().optional(),
+ userAudioFile: z.instanceof(ArrayBuffer).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreAWordOrSentenceRequest} scoreAWordOrSentenceRequest
+ * @property {string} - includes fluency scoring for this request.
+ * @property {string} - Instructs Speechace to automatically infer expected pronunciation for unknown terms such names, places, etc.
+ * @property {string} - Indicates no multiple choice type text used.
+ * @property {string} - One or more paragraphs of text to score.
+ * @property {ArrayBuffer} - file with user audio (wav, mp3, m4a, webm, ogg, aiff)
+ */
+export type ScoreAWordOrSentenceRequest = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentenceRequestResponse = z.lazy(() => {
+ return z
+ .object({
+ include_fluency: z.string().optional(),
+ include_unknown_words: z.string().optional(),
+ no_mc: z.string().optional(),
+ text: z.string().optional(),
+ user_audio_file: z.instanceof(ArrayBuffer).optional(),
+ })
+ .transform((data) => ({
+ includeFluency: data['include_fluency'],
+ includeUnknownWords: data['include_unknown_words'],
+ noMc: data['no_mc'],
+ text: data['text'],
+ userAudioFile: data['user_audio_file'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreAWordOrSentenceRequestRequest = z.lazy(() => {
+ return z
+ .object({
+ includeFluency: z.string().nullish(),
+ includeUnknownWords: z.string().nullish(),
+ noMc: z.string().nullish(),
+ text: z.string().nullish(),
+ userAudioFile: z.instanceof(ArrayBuffer).nullish(),
+ })
+ .transform((data) => ({
+ include_fluency: data['includeFluency'],
+ include_unknown_words: data['includeUnknownWords'],
+ no_mc: data['noMc'],
+ text: data['text'],
+ user_audio_file: data['userAudioFile'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/score-issue-list.ts b/src/services/v9-latest_/models/score-issue-list.ts
new file mode 100644
index 0000000..0de63a9
--- /dev/null
+++ b/src/services/v9-latest_/models/score-issue-list.ts
@@ -0,0 +1,65 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreIssueList = z.lazy(() => {
+ return z.object({
+ detailMessage: z.string().optional(),
+ shortMessage: z.string().optional(),
+ source: z.string().optional(),
+ status: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreIssueList} scoreIssueList
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ */
+export type ScoreIssueList = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreIssueListResponse = z.lazy(() => {
+ return z
+ .object({
+ detail_message: z.string().optional(),
+ short_message: z.string().optional(),
+ source: z.string().optional(),
+ status: z.string().optional(),
+ })
+ .transform((data) => ({
+ detailMessage: data['detail_message'],
+ shortMessage: data['short_message'],
+ source: data['source'],
+ status: data['status'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreIssueListRequest = z.lazy(() => {
+ return z
+ .object({
+ detailMessage: z.string().nullish(),
+ shortMessage: z.string().nullish(),
+ source: z.string().nullish(),
+ status: z.string().nullish(),
+ })
+ .transform((data) => ({
+ detail_message: data['detailMessage'],
+ short_message: data['shortMessage'],
+ source: data['source'],
+ status: data['status'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/score-task-request.ts b/src/services/v9-latest_/models/score-task-request.ts
new file mode 100644
index 0000000..df18a02
--- /dev/null
+++ b/src/services/v9-latest_/models/score-task-request.ts
@@ -0,0 +1,63 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const scoreTaskRequest = z.lazy(() => {
+ return z.object({
+ includeSpeechScore: z.string().optional(),
+ taskQuestion: z.string().optional(),
+ userAudioText: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {ScoreTaskRequest} scoreTaskRequest
+ * @property {string} - Default: 1
+Whether to include scoring other aspects of the speech: Pronunciation, Fluency, Grammar, Vocab, Coherence.
+Set to 0 if you only want to receive the task score.
+
+
+ * @property {string} - The question presented to the user.
+ * @property {string}
+ */
+export type ScoreTaskRequest = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreTaskRequestResponse = z.lazy(() => {
+ return z
+ .object({
+ include_speech_score: z.string().optional(),
+ task_question: z.string().optional(),
+ user_audio_text: z.string().optional(),
+ })
+ .transform((data) => ({
+ includeSpeechScore: data['include_speech_score'],
+ taskQuestion: data['task_question'],
+ userAudioText: data['user_audio_text'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const scoreTaskRequestRequest = z.lazy(() => {
+ return z
+ .object({
+ includeSpeechScore: z.string().nullish(),
+ taskQuestion: z.string().nullish(),
+ userAudioText: z.string().nullish(),
+ })
+ .transform((data) => ({
+ include_speech_score: data['includeSpeechScore'],
+ task_question: data['taskQuestion'],
+ user_audio_text: data['userAudioText'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/segment-metrics-list-cefr-score-1.ts b/src/services/v9-latest_/models/segment-metrics-list-cefr-score-1.ts
new file mode 100644
index 0000000..a596770
--- /dev/null
+++ b/src/services/v9-latest_/models/segment-metrics-list-cefr-score-1.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const segmentMetricsListCefrScore1 = z.lazy(() => {
+ return z.object({
+ fluency: z.string().optional(),
+ pronunciation: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SegmentMetricsListCefrScore1} segmentMetricsListCefrScore1
+ * @property {string}
+ * @property {string}
+ */
+export type SegmentMetricsListCefrScore1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListCefrScore1Response = z.lazy(() => {
+ return z
+ .object({
+ fluency: z.string().optional(),
+ pronunciation: z.string().optional(),
+ })
+ .transform((data) => ({
+ fluency: data['fluency'],
+ pronunciation: data['pronunciation'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListCefrScore1Request = z.lazy(() => {
+ return z.object({ fluency: z.string().nullish(), pronunciation: z.string().nullish() }).transform((data) => ({
+ fluency: data['fluency'],
+ pronunciation: data['pronunciation'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/segment-metrics-list-cefr-score-2.ts b/src/services/v9-latest_/models/segment-metrics-list-cefr-score-2.ts
new file mode 100644
index 0000000..c9eddb1
--- /dev/null
+++ b/src/services/v9-latest_/models/segment-metrics-list-cefr-score-2.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const segmentMetricsListCefrScore2 = z.lazy(() => {
+ return z.object({
+ coherence: z.string().optional(),
+ fluency: z.string().optional(),
+ grammar: z.string().optional(),
+ pronunciation: z.string().optional(),
+ vocab: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SegmentMetricsListCefrScore2} segmentMetricsListCefrScore2
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ */
+export type SegmentMetricsListCefrScore2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListCefrScore2Response = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.string().optional(),
+ fluency: z.string().optional(),
+ grammar: z.string().optional(),
+ pronunciation: z.string().optional(),
+ vocab: z.string().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListCefrScore2Request = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.string().nullish(),
+ fluency: z.string().nullish(),
+ grammar: z.string().nullish(),
+ pronunciation: z.string().nullish(),
+ vocab: z.string().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/segment-metrics-list-ielts-score.ts b/src/services/v9-latest_/models/segment-metrics-list-ielts-score.ts
new file mode 100644
index 0000000..8353e81
--- /dev/null
+++ b/src/services/v9-latest_/models/segment-metrics-list-ielts-score.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const segmentMetricsListIeltsScore = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SegmentMetricsListIeltsScore} segmentMetricsListIeltsScore
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SegmentMetricsListIeltsScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListIeltsScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListIeltsScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().nullish(),
+ fluency: z.number().nullish(),
+ grammar: z.number().nullish(),
+ pronunciation: z.number().nullish(),
+ vocab: z.number().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/segment-metrics-list-pte-score.ts b/src/services/v9-latest_/models/segment-metrics-list-pte-score.ts
new file mode 100644
index 0000000..e4113d6
--- /dev/null
+++ b/src/services/v9-latest_/models/segment-metrics-list-pte-score.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const segmentMetricsListPteScore = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SegmentMetricsListPteScore} segmentMetricsListPteScore
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SegmentMetricsListPteScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListPteScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListPteScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().nullish(),
+ fluency: z.number().nullish(),
+ grammar: z.number().nullish(),
+ pronunciation: z.number().nullish(),
+ vocab: z.number().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/segment-metrics-list-speechace-score-1.ts b/src/services/v9-latest_/models/segment-metrics-list-speechace-score-1.ts
new file mode 100644
index 0000000..9259e37
--- /dev/null
+++ b/src/services/v9-latest_/models/segment-metrics-list-speechace-score-1.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const segmentMetricsListSpeechaceScore1 = z.lazy(() => {
+ return z.object({
+ fluency: z.number().optional(),
+ pronunciation: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SegmentMetricsListSpeechaceScore1} segmentMetricsListSpeechaceScore1
+ * @property {number}
+ * @property {number}
+ */
+export type SegmentMetricsListSpeechaceScore1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListSpeechaceScore1Response = z.lazy(() => {
+ return z
+ .object({
+ fluency: z.number().optional(),
+ pronunciation: z.number().optional(),
+ })
+ .transform((data) => ({
+ fluency: data['fluency'],
+ pronunciation: data['pronunciation'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListSpeechaceScore1Request = z.lazy(() => {
+ return z.object({ fluency: z.number().nullish(), pronunciation: z.number().nullish() }).transform((data) => ({
+ fluency: data['fluency'],
+ pronunciation: data['pronunciation'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/segment-metrics-list-speechace-score-2.ts b/src/services/v9-latest_/models/segment-metrics-list-speechace-score-2.ts
new file mode 100644
index 0000000..b0d30b4
--- /dev/null
+++ b/src/services/v9-latest_/models/segment-metrics-list-speechace-score-2.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const segmentMetricsListSpeechaceScore2 = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SegmentMetricsListSpeechaceScore2} segmentMetricsListSpeechaceScore2
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SegmentMetricsListSpeechaceScore2 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListSpeechaceScore2Response = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListSpeechaceScore2Request = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().nullish(),
+ fluency: z.number().nullish(),
+ grammar: z.number().nullish(),
+ pronunciation: z.number().nullish(),
+ vocab: z.number().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/segment-metrics-list-toeic-score.ts b/src/services/v9-latest_/models/segment-metrics-list-toeic-score.ts
new file mode 100644
index 0000000..11cda00
--- /dev/null
+++ b/src/services/v9-latest_/models/segment-metrics-list-toeic-score.ts
@@ -0,0 +1,71 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const segmentMetricsListToeicScore = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SegmentMetricsListToeicScore} segmentMetricsListToeicScore
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SegmentMetricsListToeicScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListToeicScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const segmentMetricsListToeicScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().nullish(),
+ fluency: z.number().nullish(),
+ grammar: z.number().nullish(),
+ pronunciation: z.number().nullish(),
+ vocab: z.number().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/speech-score-cefr-score.ts b/src/services/v9-latest_/models/speech-score-cefr-score.ts
new file mode 100644
index 0000000..1179200
--- /dev/null
+++ b/src/services/v9-latest_/models/speech-score-cefr-score.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreCefrScore = z.lazy(() => {
+ return z.object({
+ coherence: z.string().optional(),
+ fluency: z.string().optional(),
+ grammar: z.string().optional(),
+ overall: z.string().optional(),
+ pronunciation: z.string().optional(),
+ vocab: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreCefrScore} speechScoreCefrScore
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ * @property {string}
+ */
+export type SpeechScoreCefrScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreCefrScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.string().optional(),
+ fluency: z.string().optional(),
+ grammar: z.string().optional(),
+ overall: z.string().optional(),
+ pronunciation: z.string().optional(),
+ vocab: z.string().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreCefrScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.string().nullish(),
+ fluency: z.string().nullish(),
+ grammar: z.string().nullish(),
+ overall: z.string().nullish(),
+ pronunciation: z.string().nullish(),
+ vocab: z.string().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/speech-score-fluency-1.ts b/src/services/v9-latest_/models/speech-score-fluency-1.ts
new file mode 100644
index 0000000..6bc775b
--- /dev/null
+++ b/src/services/v9-latest_/models/speech-score-fluency-1.ts
@@ -0,0 +1,75 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ fluencyOverallMetrics2,
+ fluencyOverallMetrics2Request,
+ fluencyOverallMetrics2Response,
+} from './fluency-overall-metrics-2';
+import {
+ fluencySegmentMetricsList2,
+ fluencySegmentMetricsList2Request,
+ fluencySegmentMetricsList2Response,
+} from './fluency-segment-metrics-list-2';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreFluency1 = z.lazy(() => {
+ return z.object({
+ fluencyVersion: z.string().optional(),
+ ieltsSubscoreVersion: z.string().optional().nullable(),
+ overallMetrics: fluencyOverallMetrics2.optional(),
+ segmentMetricsList: z.array(fluencySegmentMetricsList2).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreFluency1} speechScoreFluency1
+ * @property {string}
+ * @property {string}
+ * @property {FluencyOverallMetrics2}
+ * @property {FluencySegmentMetricsList2[]}
+ */
+export type SpeechScoreFluency1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreFluency1Response = z.lazy(() => {
+ return z
+ .object({
+ fluency_version: z.string().optional(),
+ ielts_subscore_version: z.string().optional().nullable(),
+ overall_metrics: fluencyOverallMetrics2Response.optional(),
+ segment_metrics_list: z.array(fluencySegmentMetricsList2Response).optional(),
+ })
+ .transform((data) => ({
+ fluencyVersion: data['fluency_version'],
+ ieltsSubscoreVersion: data['ielts_subscore_version'],
+ overallMetrics: data['overall_metrics'],
+ segmentMetricsList: data['segment_metrics_list'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreFluency1Request = z.lazy(() => {
+ return z
+ .object({
+ fluencyVersion: z.string().nullish(),
+ ieltsSubscoreVersion: z.string().nullish(),
+ overallMetrics: fluencyOverallMetrics2Request.nullish(),
+ segmentMetricsList: z.array(fluencySegmentMetricsList2Request).nullish(),
+ })
+ .transform((data) => ({
+ fluency_version: data['fluencyVersion'],
+ ielts_subscore_version: data['ieltsSubscoreVersion'],
+ overall_metrics: data['overallMetrics'],
+ segment_metrics_list: data['segmentMetricsList'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/speech-score-ielts-score.ts b/src/services/v9-latest_/models/speech-score-ielts-score.ts
new file mode 100644
index 0000000..d73ac13
--- /dev/null
+++ b/src/services/v9-latest_/models/speech-score-ielts-score.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreIeltsScore = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ overall: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreIeltsScore} speechScoreIeltsScore
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SpeechScoreIeltsScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreIeltsScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ overall: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreIeltsScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().nullish(),
+ fluency: z.number().nullish(),
+ grammar: z.number().nullish(),
+ overall: z.number().nullish(),
+ pronunciation: z.number().nullish(),
+ vocab: z.number().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/speech-score-pte-score.ts b/src/services/v9-latest_/models/speech-score-pte-score.ts
new file mode 100644
index 0000000..b6fb8f1
--- /dev/null
+++ b/src/services/v9-latest_/models/speech-score-pte-score.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScorePteScore = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ overall: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScorePteScore} speechScorePteScore
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SpeechScorePteScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScorePteScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ overall: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScorePteScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().nullish(),
+ fluency: z.number().nullish(),
+ grammar: z.number().nullish(),
+ overall: z.number().nullish(),
+ pronunciation: z.number().nullish(),
+ vocab: z.number().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/speech-score-relevance-1.ts b/src/services/v9-latest_/models/speech-score-relevance-1.ts
new file mode 100644
index 0000000..48d2544
--- /dev/null
+++ b/src/services/v9-latest_/models/speech-score-relevance-1.ts
@@ -0,0 +1,43 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreRelevance1 = z.lazy(() => {
+ return z.object({
+ class: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreRelevance1} speechScoreRelevance1
+ * @property {string}
+ */
+export type SpeechScoreRelevance1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreRelevance1Response = z.lazy(() => {
+ return z
+ .object({
+ class: z.string().optional(),
+ })
+ .transform((data) => ({
+ class: data['class'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreRelevance1Request = z.lazy(() => {
+ return z.object({ class: z.string().nullish() }).transform((data) => ({
+ class: data['class'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/speech-score-speechace-score.ts b/src/services/v9-latest_/models/speech-score-speechace-score.ts
new file mode 100644
index 0000000..b1d75d6
--- /dev/null
+++ b/src/services/v9-latest_/models/speech-score-speechace-score.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreSpeechaceScore = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ overall: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreSpeechaceScore} speechScoreSpeechaceScore
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SpeechScoreSpeechaceScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreSpeechaceScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ overall: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreSpeechaceScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().nullish(),
+ fluency: z.number().nullish(),
+ grammar: z.number().nullish(),
+ overall: z.number().nullish(),
+ pronunciation: z.number().nullish(),
+ vocab: z.number().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/speech-score-toeic-score.ts b/src/services/v9-latest_/models/speech-score-toeic-score.ts
new file mode 100644
index 0000000..86a1955
--- /dev/null
+++ b/src/services/v9-latest_/models/speech-score-toeic-score.ts
@@ -0,0 +1,77 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreToeicScore = z.lazy(() => {
+ return z.object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ overall: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreToeicScore} speechScoreToeicScore
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ * @property {number}
+ */
+export type SpeechScoreToeicScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreToeicScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().optional(),
+ fluency: z.number().optional(),
+ grammar: z.number().optional(),
+ overall: z.number().optional(),
+ pronunciation: z.number().optional(),
+ vocab: z.number().optional(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreToeicScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ coherence: z.number().nullish(),
+ fluency: z.number().nullish(),
+ grammar: z.number().nullish(),
+ overall: z.number().nullish(),
+ pronunciation: z.number().nullish(),
+ vocab: z.number().nullish(),
+ })
+ .transform((data) => ({
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ overall: data['overall'],
+ pronunciation: data['pronunciation'],
+ vocab: data['vocab'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/speech-score-word-score-list-1.ts b/src/services/v9-latest_/models/speech-score-word-score-list-1.ts
new file mode 100644
index 0000000..a9ecf8a
--- /dev/null
+++ b/src/services/v9-latest_/models/speech-score-word-score-list-1.ts
@@ -0,0 +1,81 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ wordScoreListPhoneScoreList2,
+ wordScoreListPhoneScoreList2Request,
+ wordScoreListPhoneScoreList2Response,
+} from './word-score-list-phone-score-list-2';
+import {
+ wordScoreListSyllableScoreList2,
+ wordScoreListSyllableScoreList2Request,
+ wordScoreListSyllableScoreList2Response,
+} from './word-score-list-syllable-score-list-2';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const speechScoreWordScoreList1 = z.lazy(() => {
+ return z.object({
+ endingPunctuation: z.string().optional(),
+ phoneScoreList: z.array(wordScoreListPhoneScoreList2).optional(),
+ qualityScore: z.number().optional(),
+ syllableScoreList: z.array(wordScoreListSyllableScoreList2).optional(),
+ word: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {SpeechScoreWordScoreList1} speechScoreWordScoreList1
+ * @property {string}
+ * @property {WordScoreListPhoneScoreList2[]}
+ * @property {number}
+ * @property {WordScoreListSyllableScoreList2[]}
+ * @property {string}
+ */
+export type SpeechScoreWordScoreList1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreWordScoreList1Response = z.lazy(() => {
+ return z
+ .object({
+ ending_punctuation: z.string().optional(),
+ phone_score_list: z.array(wordScoreListPhoneScoreList2Response).optional(),
+ quality_score: z.number().optional(),
+ syllable_score_list: z.array(wordScoreListSyllableScoreList2Response).optional(),
+ word: z.string().optional(),
+ })
+ .transform((data) => ({
+ endingPunctuation: data['ending_punctuation'],
+ phoneScoreList: data['phone_score_list'],
+ qualityScore: data['quality_score'],
+ syllableScoreList: data['syllable_score_list'],
+ word: data['word'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const speechScoreWordScoreList1Request = z.lazy(() => {
+ return z
+ .object({
+ endingPunctuation: z.string().nullish(),
+ phoneScoreList: z.array(wordScoreListPhoneScoreList2Request).nullish(),
+ qualityScore: z.number().nullish(),
+ syllableScoreList: z.array(wordScoreListSyllableScoreList2Request).nullish(),
+ word: z.string().nullish(),
+ })
+ .transform((data) => ({
+ ending_punctuation: data['endingPunctuation'],
+ phone_score_list: data['phoneScoreList'],
+ quality_score: data['qualityScore'],
+ syllable_score_list: data['syllableScoreList'],
+ word: data['word'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/text-score-cefr-score.ts b/src/services/v9-latest_/models/text-score-cefr-score.ts
new file mode 100644
index 0000000..c463fb9
--- /dev/null
+++ b/src/services/v9-latest_/models/text-score-cefr-score.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScoreCefrScore = z.lazy(() => {
+ return z.object({
+ fluency: z.string().optional(),
+ pronunciation: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScoreCefrScore} textScoreCefrScore
+ * @property {string}
+ * @property {string}
+ */
+export type TextScoreCefrScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreCefrScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ fluency: z.string().optional(),
+ pronunciation: z.string().optional(),
+ })
+ .transform((data) => ({
+ fluency: data['fluency'],
+ pronunciation: data['pronunciation'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreCefrScoreRequest = z.lazy(() => {
+ return z.object({ fluency: z.string().nullish(), pronunciation: z.string().nullish() }).transform((data) => ({
+ fluency: data['fluency'],
+ pronunciation: data['pronunciation'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/text-score-fluency-1.ts b/src/services/v9-latest_/models/text-score-fluency-1.ts
new file mode 100644
index 0000000..32abe37
--- /dev/null
+++ b/src/services/v9-latest_/models/text-score-fluency-1.ts
@@ -0,0 +1,69 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ fluencyOverallMetrics1,
+ fluencyOverallMetrics1Request,
+ fluencyOverallMetrics1Response,
+} from './fluency-overall-metrics-1';
+import {
+ fluencySegmentMetricsList1,
+ fluencySegmentMetricsList1Request,
+ fluencySegmentMetricsList1Response,
+} from './fluency-segment-metrics-list-1';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScoreFluency1 = z.lazy(() => {
+ return z.object({
+ fluencyVersion: z.any().optional().nullable(),
+ overallMetrics: fluencyOverallMetrics1.optional(),
+ segmentMetricsList: z.array(fluencySegmentMetricsList1).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScoreFluency1} textScoreFluency1
+ * @property {any}
+ * @property {FluencyOverallMetrics1}
+ * @property {FluencySegmentMetricsList1[]}
+ */
+export type TextScoreFluency1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreFluency1Response = z.lazy(() => {
+ return z
+ .object({
+ fluency_version: z.any().optional().nullable(),
+ overall_metrics: fluencyOverallMetrics1Response.optional(),
+ segment_metrics_list: z.array(fluencySegmentMetricsList1Response).optional(),
+ })
+ .transform((data) => ({
+ fluencyVersion: data['fluency_version'],
+ overallMetrics: data['overall_metrics'],
+ segmentMetricsList: data['segment_metrics_list'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreFluency1Request = z.lazy(() => {
+ return z
+ .object({
+ fluencyVersion: z.any().nullish(),
+ overallMetrics: fluencyOverallMetrics1Request.nullish(),
+ segmentMetricsList: z.array(fluencySegmentMetricsList1Request).nullish(),
+ })
+ .transform((data) => ({
+ fluency_version: data['fluencyVersion'],
+ overall_metrics: data['overallMetrics'],
+ segment_metrics_list: data['segmentMetricsList'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/text-score-ielts-score.ts b/src/services/v9-latest_/models/text-score-ielts-score.ts
new file mode 100644
index 0000000..62c9f6d
--- /dev/null
+++ b/src/services/v9-latest_/models/text-score-ielts-score.ts
@@ -0,0 +1,43 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScoreIeltsScore = z.lazy(() => {
+ return z.object({
+ pronunciation: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScoreIeltsScore} textScoreIeltsScore
+ * @property {number}
+ */
+export type TextScoreIeltsScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreIeltsScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ pronunciation: z.number().optional(),
+ })
+ .transform((data) => ({
+ pronunciation: data['pronunciation'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreIeltsScoreRequest = z.lazy(() => {
+ return z.object({ pronunciation: z.number().nullish() }).transform((data) => ({
+ pronunciation: data['pronunciation'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/text-score-pte-score.ts b/src/services/v9-latest_/models/text-score-pte-score.ts
new file mode 100644
index 0000000..6963ba7
--- /dev/null
+++ b/src/services/v9-latest_/models/text-score-pte-score.ts
@@ -0,0 +1,43 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScorePteScore = z.lazy(() => {
+ return z.object({
+ pronunciation: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScorePteScore} textScorePteScore
+ * @property {number}
+ */
+export type TextScorePteScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScorePteScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ pronunciation: z.number().optional(),
+ })
+ .transform((data) => ({
+ pronunciation: data['pronunciation'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScorePteScoreRequest = z.lazy(() => {
+ return z.object({ pronunciation: z.number().nullish() }).transform((data) => ({
+ pronunciation: data['pronunciation'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/text-score-speechace-score.ts b/src/services/v9-latest_/models/text-score-speechace-score.ts
new file mode 100644
index 0000000..6eedaa7
--- /dev/null
+++ b/src/services/v9-latest_/models/text-score-speechace-score.ts
@@ -0,0 +1,48 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScoreSpeechaceScore = z.lazy(() => {
+ return z.object({
+ fluency: z.number().optional(),
+ pronunciation: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScoreSpeechaceScore} textScoreSpeechaceScore
+ * @property {number}
+ * @property {number}
+ */
+export type TextScoreSpeechaceScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreSpeechaceScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ fluency: z.number().optional(),
+ pronunciation: z.number().optional(),
+ })
+ .transform((data) => ({
+ fluency: data['fluency'],
+ pronunciation: data['pronunciation'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreSpeechaceScoreRequest = z.lazy(() => {
+ return z.object({ fluency: z.number().nullish(), pronunciation: z.number().nullish() }).transform((data) => ({
+ fluency: data['fluency'],
+ pronunciation: data['pronunciation'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/text-score-toeic-score.ts b/src/services/v9-latest_/models/text-score-toeic-score.ts
new file mode 100644
index 0000000..2d1c014
--- /dev/null
+++ b/src/services/v9-latest_/models/text-score-toeic-score.ts
@@ -0,0 +1,43 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScoreToeicScore = z.lazy(() => {
+ return z.object({
+ pronunciation: z.number().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScoreToeicScore} textScoreToeicScore
+ * @property {number}
+ */
+export type TextScoreToeicScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreToeicScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ pronunciation: z.number().optional(),
+ })
+ .transform((data) => ({
+ pronunciation: data['pronunciation'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreToeicScoreRequest = z.lazy(() => {
+ return z.object({ pronunciation: z.number().nullish() }).transform((data) => ({
+ pronunciation: data['pronunciation'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/text-score-word-score-list-1.ts b/src/services/v9-latest_/models/text-score-word-score-list-1.ts
new file mode 100644
index 0000000..d3de00c
--- /dev/null
+++ b/src/services/v9-latest_/models/text-score-word-score-list-1.ts
@@ -0,0 +1,75 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ wordScoreListPhoneScoreList1,
+ wordScoreListPhoneScoreList1Request,
+ wordScoreListPhoneScoreList1Response,
+} from './word-score-list-phone-score-list-1';
+import {
+ wordScoreListSyllableScoreList1,
+ wordScoreListSyllableScoreList1Request,
+ wordScoreListSyllableScoreList1Response,
+} from './word-score-list-syllable-score-list-1';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const textScoreWordScoreList1 = z.lazy(() => {
+ return z.object({
+ phoneScoreList: z.array(wordScoreListPhoneScoreList1).optional(),
+ qualityScore: z.number().optional(),
+ syllableScoreList: z.array(wordScoreListSyllableScoreList1).optional(),
+ word: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TextScoreWordScoreList1} textScoreWordScoreList1
+ * @property {WordScoreListPhoneScoreList1[]}
+ * @property {number}
+ * @property {WordScoreListSyllableScoreList1[]}
+ * @property {string}
+ */
+export type TextScoreWordScoreList1 = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreWordScoreList1Response = z.lazy(() => {
+ return z
+ .object({
+ phone_score_list: z.array(wordScoreListPhoneScoreList1Response).optional(),
+ quality_score: z.number().optional(),
+ syllable_score_list: z.array(wordScoreListSyllableScoreList1Response).optional(),
+ word: z.string().optional(),
+ })
+ .transform((data) => ({
+ phoneScoreList: data['phone_score_list'],
+ qualityScore: data['quality_score'],
+ syllableScoreList: data['syllable_score_list'],
+ word: data['word'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const textScoreWordScoreList1Request = z.lazy(() => {
+ return z
+ .object({
+ phoneScoreList: z.array(wordScoreListPhoneScoreList1Request).nullish(),
+ qualityScore: z.number().nullish(),
+ syllableScoreList: z.array(wordScoreListSyllableScoreList1Request).nullish(),
+ word: z.string().nullish(),
+ })
+ .transform((data) => ({
+ phone_score_list: data['phoneScoreList'],
+ quality_score: data['qualityScore'],
+ syllable_score_list: data['syllableScoreList'],
+ word: data['word'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/transcribe-score-ok-response-speech-score.ts b/src/services/v9-latest_/models/transcribe-score-ok-response-speech-score.ts
new file mode 100644
index 0000000..b2e1417
--- /dev/null
+++ b/src/services/v9-latest_/models/transcribe-score-ok-response-speech-score.ts
@@ -0,0 +1,161 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ speechScoreCefrScore,
+ speechScoreCefrScoreRequest,
+ speechScoreCefrScoreResponse,
+} from './speech-score-cefr-score';
+import { coherence, coherenceRequest, coherenceResponse } from './coherence';
+import { speechScoreFluency1, speechScoreFluency1Request, speechScoreFluency1Response } from './speech-score-fluency-1';
+import { grammar, grammarRequest, grammarResponse } from './grammar';
+import {
+ speechScoreIeltsScore,
+ speechScoreIeltsScoreRequest,
+ speechScoreIeltsScoreResponse,
+} from './speech-score-ielts-score';
+import { speechScorePteScore, speechScorePteScoreRequest, speechScorePteScoreResponse } from './speech-score-pte-score';
+import {
+ speechScoreRelevance1,
+ speechScoreRelevance1Request,
+ speechScoreRelevance1Response,
+} from './speech-score-relevance-1';
+import { scoreIssueList, scoreIssueListRequest, scoreIssueListResponse } from './score-issue-list';
+import {
+ speechScoreSpeechaceScore,
+ speechScoreSpeechaceScoreRequest,
+ speechScoreSpeechaceScoreResponse,
+} from './speech-score-speechace-score';
+import {
+ speechScoreToeicScore,
+ speechScoreToeicScoreRequest,
+ speechScoreToeicScoreResponse,
+} from './speech-score-toeic-score';
+import { vocab, vocabRequest, vocabResponse } from './vocab';
+import {
+ speechScoreWordScoreList1,
+ speechScoreWordScoreList1Request,
+ speechScoreWordScoreList1Response,
+} from './speech-score-word-score-list-1';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const transcribeScoreOkResponseSpeechScore = z.lazy(() => {
+ return z.object({
+ asrVersion: z.string().optional(),
+ cefrScore: speechScoreCefrScore.optional(),
+ coherence: coherence.optional(),
+ fluency: speechScoreFluency1.optional(),
+ grammar: grammar.optional(),
+ ieltsScore: speechScoreIeltsScore.optional(),
+ pteScore: speechScorePteScore.optional(),
+ relevance: speechScoreRelevance1.optional(),
+ scoreIssueList: z.array(scoreIssueList).optional(),
+ speechaceScore: speechScoreSpeechaceScore.optional(),
+ toeicScore: speechScoreToeicScore.optional(),
+ transcript: z.string().optional(),
+ vocab: vocab.optional(),
+ wordScoreList: z.array(speechScoreWordScoreList1).optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TranscribeScoreOkResponseSpeechScore} transcribeScoreOkResponseSpeechScore
+ * @property {string}
+ * @property {SpeechScoreCefrScore}
+ * @property {Coherence}
+ * @property {SpeechScoreFluency1}
+ * @property {Grammar}
+ * @property {SpeechScoreIeltsScore}
+ * @property {SpeechScorePteScore}
+ * @property {SpeechScoreRelevance1}
+ * @property {ScoreIssueList[]}
+ * @property {SpeechScoreSpeechaceScore}
+ * @property {SpeechScoreToeicScore}
+ * @property {string}
+ * @property {Vocab}
+ * @property {SpeechScoreWordScoreList1[]}
+ */
+export type TranscribeScoreOkResponseSpeechScore = z.infer;
+
+/**
+ * The shape of the model mapping from the api schema into the application shape.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const transcribeScoreOkResponseSpeechScoreResponse = z.lazy(() => {
+ return z
+ .object({
+ asr_version: z.string().optional(),
+ cefr_score: speechScoreCefrScoreResponse.optional(),
+ coherence: coherenceResponse.optional(),
+ fluency: speechScoreFluency1Response.optional(),
+ grammar: grammarResponse.optional(),
+ ielts_score: speechScoreIeltsScoreResponse.optional(),
+ pte_score: speechScorePteScoreResponse.optional(),
+ relevance: speechScoreRelevance1Response.optional(),
+ score_issue_list: z.array(scoreIssueListResponse).optional(),
+ speechace_score: speechScoreSpeechaceScoreResponse.optional(),
+ toeic_score: speechScoreToeicScoreResponse.optional(),
+ transcript: z.string().optional(),
+ vocab: vocabResponse.optional(),
+ word_score_list: z.array(speechScoreWordScoreList1Response).optional(),
+ })
+ .transform((data) => ({
+ asrVersion: data['asr_version'],
+ cefrScore: data['cefr_score'],
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ ieltsScore: data['ielts_score'],
+ pteScore: data['pte_score'],
+ relevance: data['relevance'],
+ scoreIssueList: data['score_issue_list'],
+ speechaceScore: data['speechace_score'],
+ toeicScore: data['toeic_score'],
+ transcript: data['transcript'],
+ vocab: data['vocab'],
+ wordScoreList: data['word_score_list'],
+ }));
+});
+
+/**
+ * The shape of the model mapping from the application shape into the api schema.
+ * Is equal to application shape if all property names match the api schema
+ */
+export const transcribeScoreOkResponseSpeechScoreRequest = z.lazy(() => {
+ return z
+ .object({
+ asrVersion: z.string().nullish(),
+ cefrScore: speechScoreCefrScoreRequest.nullish(),
+ coherence: coherenceRequest.nullish(),
+ fluency: speechScoreFluency1Request.nullish(),
+ grammar: grammarRequest.nullish(),
+ ieltsScore: speechScoreIeltsScoreRequest.nullish(),
+ pteScore: speechScorePteScoreRequest.nullish(),
+ relevance: speechScoreRelevance1Request.nullish(),
+ scoreIssueList: z.array(scoreIssueListRequest).nullish(),
+ speechaceScore: speechScoreSpeechaceScoreRequest.nullish(),
+ toeicScore: speechScoreToeicScoreRequest.nullish(),
+ transcript: z.string().nullish(),
+ vocab: vocabRequest.nullish(),
+ wordScoreList: z.array(speechScoreWordScoreList1Request).nullish(),
+ })
+ .transform((data) => ({
+ asr_version: data['asrVersion'],
+ cefr_score: data['cefrScore'],
+ coherence: data['coherence'],
+ fluency: data['fluency'],
+ grammar: data['grammar'],
+ ielts_score: data['ieltsScore'],
+ pte_score: data['pteScore'],
+ relevance: data['relevance'],
+ score_issue_list: data['scoreIssueList'],
+ speechace_score: data['speechaceScore'],
+ toeic_score: data['toeicScore'],
+ transcript: data['transcript'],
+ vocab: data['vocab'],
+ word_score_list: data['wordScoreList'],
+ }));
+});
diff --git a/src/services/v9-latest_/models/transcribe-score-ok-response.ts b/src/services/v9-latest_/models/transcribe-score-ok-response.ts
new file mode 100644
index 0000000..40e28ad
--- /dev/null
+++ b/src/services/v9-latest_/models/transcribe-score-ok-response.ts
@@ -0,0 +1,70 @@
+// This file was generated by liblab | https://liblab.com/
+
+import { z } from 'zod';
+import {
+ transcribeScoreOkResponseSpeechScore,
+ transcribeScoreOkResponseSpeechScoreRequest,
+ transcribeScoreOkResponseSpeechScoreResponse,
+} from './transcribe-score-ok-response-speech-score';
+
+/**
+ * The shape of the model inside the application code - what the users use
+ */
+export const transcribeScoreOkResponse = z.lazy(() => {
+ return z.object({
+ quotaRemaining: z.number().optional(),
+ speechScore: transcribeScoreOkResponseSpeechScore.optional(),
+ status: z.string().optional(),
+ version: z.string().optional(),
+ });
+});
+
+/**
+ *
+ * @typedef {TranscribeScoreOkResponse} transcribeScoreOkResponse
+ * @property {number}
+ * @property {TranscribeScoreOkResponseSpeechScore}
+ * @property {string}
+ * @property {string}
+ */
+export type TranscribeScoreOkResponse = z.infer