diff --git a/.fernignore b/.fernignore new file mode 100644 index 0000000..084a8eb --- /dev/null +++ b/.fernignore @@ -0,0 +1 @@ +# Specify files that shouldn't be modified by Fern diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cf13c1c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: ci + +on: [push] + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up node + uses: actions/setup-node@v3 + + - name: Compile + run: yarn && yarn build + + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Set up node + uses: actions/setup-node@v3 + + - name: Compile + run: yarn && yarn test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72271e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +.DS_Store +/dist \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..6db0876 --- /dev/null +++ b/.npmignore @@ -0,0 +1,9 @@ +node_modules +src +tests +.gitignore +.github +.fernignore +.prettierrc.yml +tsconfig.json +yarn.lock \ No newline at end of file diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 0000000..0c06786 --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,2 @@ +tabWidth: 4 +printWidth: 120 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..35e0fd9 --- /dev/null +++ b/README.md @@ -0,0 +1,137 @@ +# Gooey TypeScript Library + +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern) +[![npm shield](https://img.shields.io/npm/v/gooey)](https://www.npmjs.com/package/gooey) + +The Gooey TypeScript library provides convenient access to the Gooey API from TypeScript. + +## Installation + +```sh +npm i -s gooey +``` + +## Usage + +Instantiate and use the client with the following: + +```typescript +import { GooeyClient } from "gooey"; + +const client = new GooeyClient({ apiKey: "YOUR_API_KEY", authorization: "YOUR_AUTHORIZATION" }); +await client.copilotIntegrations.videoBotsStreamCreate({ + integrationId: "integration_id", +}); +``` + +## Request And Response Types + +The SDK exports all request and response types as TypeScript interfaces. Simply import them with the +following namespace: + +```typescript +import { Gooey } from "gooey"; + +const request: Gooey.CreateStreamRequest = { + ... +}; +``` + +## Exception Handling + +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. + +```typescript +import { GooeyError } from "gooey"; + +try { + await client.copilotIntegrations.videoBotsStreamCreate(...); +} catch (err) { + if (err instanceof GooeyError) { + console.log(err.statusCode); + console.log(err.message); + console.log(err.body); + } +} +``` + +## Advanced + +### Retries + +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retriable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). + +A request is deemed retriable when any of the following HTTP status codes is returned: + +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) + +Use the `maxRetries` request option to configure this behavior. + +```typescript +const response = await client.copilotIntegrations.videoBotsStreamCreate(..., { + maxRetries: 0 // override maxRetries at the request level +}); +``` + +### Timeouts + +The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior. + +```typescript +const response = await client.copilotIntegrations.videoBotsStreamCreate(..., { + timeoutInSeconds: 30 // override timeout to 30s +}); +``` + +### Aborting Requests + +The SDK allows users to abort requests at any point by passing in an abort signal. + +```typescript +const controller = new AbortController(); +const response = await client.copilotIntegrations.videoBotsStreamCreate(..., { + abortSignal: controller.signal +}); +controller.abort(); // aborts the request +``` + +### Runtime Compatibility + +The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following +runtimes: + +- Node.js 18+ +- Vercel +- Cloudflare Workers +- Deno v1.25+ +- Bun 1.0+ +- React Native + +### Customizing Fetch Client + +The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an +unsupported environment, this provides a way for you to break glass and ensure the SDK works. + +```typescript +import { GooeyClient } from "gooey"; + +const client = new GooeyClient({ + ... + fetcher: // provide your implementation here +}); +``` + +## Contributing + +While we value open-source contributions to this SDK, this library is generated programmatically. +Additions made directly to this library would have to be moved over to our generation code, +otherwise they would be overwritten upon the next generated release. Feel free to open a PR as +a proof of concept, but know that we will not be able to merge it as-is. We suggest opening +an issue first to discuss with us! + +On the other hand, contributions to the README are always very welcome! diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..35d6e65 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,5 @@ +/** @type {import('jest').Config} */ +module.exports = { + preset: "ts-jest", + testEnvironment: "node", +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..e7a50e8 --- /dev/null +++ b/package.json @@ -0,0 +1,39 @@ +{ + "name": "gooey", + "version": "0.0.1-beta0", + "private": false, + "repository": "https://github.com/GooeyAI/typescript-sdk", + "main": "./index.js", + "types": "./index.d.ts", + "scripts": { + "format": "prettier . --write --ignore-unknown", + "build": "tsc", + "prepack": "cp -rv dist/. .", + "test": "jest" + }, + "dependencies": { + "url-join": "4.0.1", + "form-data": "^4.0.0", + "formdata-node": "^6.0.3", + "node-fetch": "2.7.0", + "qs": "6.11.2", + "js-base64": "3.7.2" + }, + "devDependencies": { + "@types/url-join": "4.0.1", + "@types/qs": "6.9.8", + "@types/node-fetch": "2.6.9", + "jest": "29.7.0", + "@types/jest": "29.5.5", + "ts-jest": "29.1.1", + "jest-environment-jsdom": "29.7.0", + "@types/node": "17.0.33", + "prettier": "2.7.1", + "typescript": "4.6.4" + }, + "browser": { + "fs": false, + "os": false, + "path": false + } +} diff --git a/reference.md b/reference.md new file mode 100644 index 0000000..04c46a0 --- /dev/null +++ b/reference.md @@ -0,0 +1,5271 @@ +# Reference + +## CopilotIntegrations + +
client.copilotIntegrations.videoBotsStreamCreate({ ...params }) -> Gooey.CreateStreamResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.copilotIntegrations.videoBotsStreamCreate({ + integrationId: "integration_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.CreateStreamRequest` + +
+
+ +
+
+ +**requestOptions:** `CopilotIntegrations.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.copilotIntegrations.videoBotsStream(requestId) -> Gooey.VideoBotsStreamResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.copilotIntegrations.videoBotsStream("request_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestId:** `string` + +
+
+ +
+
+ +**requestOptions:** `CopilotIntegrations.RequestOptions` + +
+
+
+
+ +
+
+
+ +## CopilotForYourEnterprise + +
client.copilotForYourEnterprise.videoBots({ ...params }) -> Gooey.VideoBotsPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.copilotForYourEnterprise.videoBots({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.VideoBotsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CopilotForYourEnterprise.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.copilotForYourEnterprise.asyncVideoBots({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.copilotForYourEnterprise.asyncVideoBots({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.VideoBotsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CopilotForYourEnterprise.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.copilotForYourEnterprise.statusVideoBots({ ...params }) -> Gooey.VideoBotsPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.copilotForYourEnterprise.statusVideoBots({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusVideoBotsRequest` + +
+
+ +
+
+ +**requestOptions:** `CopilotForYourEnterprise.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AiAnimationGenerator + +
client.aiAnimationGenerator.deforumSd({ ...params }) -> Gooey.DeforumSdPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiAnimationGenerator.deforumSd({ + animationPrompts: [ + { + frame: "frame", + prompt: "prompt", + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.DeforumSdPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiAnimationGenerator.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiAnimationGenerator.asyncDeforumSd({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiAnimationGenerator.asyncDeforumSd({ + animationPrompts: [ + { + frame: "frame", + prompt: "prompt", + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.DeforumSdPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiAnimationGenerator.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiAnimationGenerator.statusDeforumSd({ ...params }) -> Gooey.DeforumSdPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiAnimationGenerator.statusDeforumSd({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusDeforumSdRequest` + +
+
+ +
+
+ +**requestOptions:** `AiAnimationGenerator.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AiArtQrCode + +
client.aiArtQrCode.artQrCode({ ...params }) -> Gooey.QrCodeGeneratorPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiArtQrCode.artQrCode({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.QrCodeGeneratorPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiArtQrCode.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiArtQrCode.asyncArtQrCode({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiArtQrCode.asyncArtQrCode({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.QrCodeGeneratorPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiArtQrCode.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiArtQrCode.statusArtQrCode({ ...params }) -> Gooey.QrCodeGeneratorPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiArtQrCode.statusArtQrCode({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusArtQrCodeRequest` + +
+
+ +
+
+ +**requestOptions:** `AiArtQrCode.RequestOptions` + +
+
+
+
+ +
+
+
+ +## GeneratePeopleAlsoAskSeoContent + +
client.generatePeopleAlsoAskSeoContent.relatedQnaMaker({ ...params }) -> Gooey.RelatedQnAPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.generatePeopleAlsoAskSeoContent.relatedQnaMaker({ + searchQuery: "search_query", + siteFilter: "site_filter", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.RelatedQnAPageRequest` + +
+
+ +
+
+ +**requestOptions:** `GeneratePeopleAlsoAskSeoContent.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.generatePeopleAlsoAskSeoContent.asyncRelatedQnaMaker({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.generatePeopleAlsoAskSeoContent.asyncRelatedQnaMaker({ + searchQuery: "search_query", + siteFilter: "site_filter", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.RelatedQnAPageRequest` + +
+
+ +
+
+ +**requestOptions:** `GeneratePeopleAlsoAskSeoContent.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.generatePeopleAlsoAskSeoContent.statusRelatedQnaMaker({ ...params }) -> Gooey.RelatedQnAPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.generatePeopleAlsoAskSeoContent.statusRelatedQnaMaker({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusRelatedQnaMakerRequest` + +
+
+ +
+
+ +**requestOptions:** `GeneratePeopleAlsoAskSeoContent.RequestOptions` + +
+
+
+
+ +
+
+
+ +## CreateAPerfectSeoOptimizedTitleParagraph + +
client.createAPerfectSeoOptimizedTitleParagraph.seoSummary({ ...params }) -> Gooey.SeoSummaryPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.createAPerfectSeoOptimizedTitleParagraph.seoSummary({ + searchQuery: "search_query", + keywords: "keywords", + title: "title", + companyUrl: "company_url", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.SeoSummaryPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.createAPerfectSeoOptimizedTitleParagraph.asyncSeoSummary({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.createAPerfectSeoOptimizedTitleParagraph.asyncSeoSummary({ + searchQuery: "search_query", + keywords: "keywords", + title: "title", + companyUrl: "company_url", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.SeoSummaryPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.createAPerfectSeoOptimizedTitleParagraph.statusSeoSummary({ ...params }) -> Gooey.SeoSummaryPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.createAPerfectSeoOptimizedTitleParagraph.statusSeoSummary({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusSeoSummaryRequest` + +
+
+ +
+
+ +**requestOptions:** `CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions` + +
+
+
+
+ +
+
+
+ +## WebSearchGpt3 + +
client.webSearchGpt3.googleGpt({ ...params }) -> Gooey.GoogleGptPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.webSearchGpt3.googleGpt({ + searchQuery: "search_query", + siteFilter: "site_filter", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.GoogleGptPageRequest` + +
+
+ +
+
+ +**requestOptions:** `WebSearchGpt3.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.webSearchGpt3.asyncGoogleGpt({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.webSearchGpt3.asyncGoogleGpt({ + searchQuery: "search_query", + siteFilter: "site_filter", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.GoogleGptPageRequest` + +
+
+ +
+
+ +**requestOptions:** `WebSearchGpt3.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.webSearchGpt3.statusGoogleGpt({ ...params }) -> Gooey.GoogleGptPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.webSearchGpt3.statusGoogleGpt({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusGoogleGptRequest` + +
+
+ +
+
+ +**requestOptions:** `WebSearchGpt3.RequestOptions` + +
+
+
+
+ +
+
+
+ +## ProfileLookupGpt3ForAiPersonalizedEmails + +
client.profileLookupGpt3ForAiPersonalizedEmails.socialLookupEmail({ ...params }) -> Gooey.SocialLookupEmailPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.profileLookupGpt3ForAiPersonalizedEmails.socialLookupEmail({ + emailAddress: "email_address", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.SocialLookupEmailPageRequest` + +
+
+ +
+
+ +**requestOptions:** `ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.profileLookupGpt3ForAiPersonalizedEmails.asyncSocialLookupEmail({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.profileLookupGpt3ForAiPersonalizedEmails.asyncSocialLookupEmail({ + emailAddress: "email_address", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.SocialLookupEmailPageRequest` + +
+
+ +
+
+ +**requestOptions:** `ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.profileLookupGpt3ForAiPersonalizedEmails.statusSocialLookupEmail({ ...params }) -> Gooey.SocialLookupEmailPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.profileLookupGpt3ForAiPersonalizedEmails.statusSocialLookupEmail({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusSocialLookupEmailRequest` + +
+
+ +
+
+ +**requestOptions:** `ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions` + +
+
+
+
+ +
+
+
+ +## BulkRunner + +
client.bulkRunner.post({ ...params }) -> Gooey.BulkRunnerPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.bulkRunner.post({ + documents: ["documents"], + runUrls: ["run_urls"], + inputColumns: { + key: "value", + }, + outputColumns: { + key: "value", + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.BulkRunnerPageRequest` + +
+
+ +
+
+ +**requestOptions:** `BulkRunner.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.bulkRunner.asyncBulkRunner({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.bulkRunner.asyncBulkRunner({ + documents: ["documents"], + runUrls: ["run_urls"], + inputColumns: { + key: "value", + }, + outputColumns: { + key: "value", + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.BulkRunnerPageRequest` + +
+
+ +
+
+ +**requestOptions:** `BulkRunner.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.bulkRunner.statusBulkRunner({ ...params }) -> Gooey.BulkRunnerPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.bulkRunner.statusBulkRunner({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusBulkRunnerRequest` + +
+
+ +
+
+ +**requestOptions:** `BulkRunner.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Evaluator + +
client.evaluator.bulkEval({ ...params }) -> Gooey.BulkEvalPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluator.bulkEval({ + documents: ["documents"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.BulkEvalPageRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluator.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluator.asyncBulkEval({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluator.asyncBulkEval({ + documents: ["documents"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.BulkEvalPageRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluator.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluator.statusBulkEval({ ...params }) -> Gooey.BulkEvalPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluator.statusBulkEval({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusBulkEvalRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluator.RequestOptions` + +
+
+
+
+ +
+
+
+ +## SyntheticDataMakerForVideosPdFs + +
client.syntheticDataMakerForVideosPdFs.docExtract({ ...params }) -> Gooey.DocExtractPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.syntheticDataMakerForVideosPdFs.docExtract({ + documents: ["documents"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.DocExtractPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SyntheticDataMakerForVideosPdFs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.syntheticDataMakerForVideosPdFs.asyncDocExtract({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.syntheticDataMakerForVideosPdFs.asyncDocExtract({ + documents: ["documents"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.DocExtractPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SyntheticDataMakerForVideosPdFs.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.syntheticDataMakerForVideosPdFs.statusDocExtract({ ...params }) -> Gooey.DocExtractPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.syntheticDataMakerForVideosPdFs.statusDocExtract({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusDocExtractRequest` + +
+
+ +
+
+ +**requestOptions:** `SyntheticDataMakerForVideosPdFs.RequestOptions` + +
+
+
+
+ +
+
+
+ +## LargeLanguageModelsGpt3 + +
client.largeLanguageModelsGpt3.compareLlm({ ...params }) -> Gooey.CompareLlmPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.largeLanguageModelsGpt3.compareLlm({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.CompareLlmPageRequest` + +
+
+ +
+
+ +**requestOptions:** `LargeLanguageModelsGpt3.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.largeLanguageModelsGpt3.asyncCompareLlm({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.largeLanguageModelsGpt3.asyncCompareLlm({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.CompareLlmPageRequest` + +
+
+ +
+
+ +**requestOptions:** `LargeLanguageModelsGpt3.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.largeLanguageModelsGpt3.statusCompareLlm({ ...params }) -> Gooey.CompareLlmPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.largeLanguageModelsGpt3.statusCompareLlm({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusCompareLlmRequest` + +
+
+ +
+
+ +**requestOptions:** `LargeLanguageModelsGpt3.RequestOptions` + +
+
+
+
+ +
+
+
+ +## SearchYourDocsWithGpt + +
client.searchYourDocsWithGpt.docSearch({ ...params }) -> Gooey.DocSearchPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.searchYourDocsWithGpt.docSearch({ + searchQuery: "search_query", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.DocSearchPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SearchYourDocsWithGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.searchYourDocsWithGpt.asyncDocSearch({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.searchYourDocsWithGpt.asyncDocSearch({ + searchQuery: "search_query", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.DocSearchPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SearchYourDocsWithGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.searchYourDocsWithGpt.statusDocSearch({ ...params }) -> Gooey.DocSearchPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.searchYourDocsWithGpt.statusDocSearch({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusDocSearchRequest` + +
+
+ +
+
+ +**requestOptions:** `SearchYourDocsWithGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +## SmartGpt + +
client.smartGpt.post({ ...params }) -> Gooey.SmartGptPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.smartGpt.post({ + inputPrompt: "input_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.SmartGptPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SmartGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.smartGpt.asyncSmartGpt({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.smartGpt.asyncSmartGpt({ + inputPrompt: "input_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.SmartGptPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SmartGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.smartGpt.statusSmartGpt({ ...params }) -> Gooey.SmartGptPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.smartGpt.statusSmartGpt({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusSmartGptRequest` + +
+
+ +
+
+ +**requestOptions:** `SmartGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +## SummarizeYourDocsWithGpt + +
client.summarizeYourDocsWithGpt.docSummary({ ...params }) -> Gooey.DocSummaryPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.summarizeYourDocsWithGpt.docSummary({ + documents: ["documents"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.DocSummaryPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SummarizeYourDocsWithGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.summarizeYourDocsWithGpt.asyncDocSummary({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.summarizeYourDocsWithGpt.asyncDocSummary({ + documents: ["documents"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.DocSummaryPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SummarizeYourDocsWithGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.summarizeYourDocsWithGpt.statusDocSummary({ ...params }) -> Gooey.DocSummaryPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.summarizeYourDocsWithGpt.statusDocSummary({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusDocSummaryRequest` + +
+
+ +
+
+ +**requestOptions:** `SummarizeYourDocsWithGpt.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Functions + +
client.functions.post({ ...params }) -> Gooey.FunctionsPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.functions.post({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.FunctionsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `Functions.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.functions.asyncFunctions({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.functions.asyncFunctions({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.FunctionsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `Functions.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.functions.statusFunctions({ ...params }) -> Gooey.FunctionsPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.functions.statusFunctions({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusFunctionsRequest` + +
+
+ +
+
+ +**requestOptions:** `Functions.RequestOptions` + +
+
+
+
+ +
+
+
+ +## LipSyncing + +
client.lipSyncing.lipsync({ ...params }) -> Gooey.LipsyncPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.lipSyncing.lipsync({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.LipsyncPageRequest` + +
+
+ +
+
+ +**requestOptions:** `LipSyncing.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.lipSyncing.asyncLipsync({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.lipSyncing.asyncLipsync({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.LipsyncPageRequest` + +
+
+ +
+
+ +**requestOptions:** `LipSyncing.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.lipSyncing.statusLipsync({ ...params }) -> Gooey.LipsyncPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.lipSyncing.statusLipsync({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusLipsyncRequest` + +
+
+ +
+
+ +**requestOptions:** `LipSyncing.RequestOptions` + +
+
+
+
+ +
+
+
+ +## LipsyncVideoWithAnyText + +
client.lipsyncVideoWithAnyText.lipsyncTts({ ...params }) -> Gooey.LipsyncTtsPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.lipsyncVideoWithAnyText.lipsyncTts({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.LipsyncTtsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `LipsyncVideoWithAnyText.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.lipsyncVideoWithAnyText.asyncLipsyncTts({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.lipsyncVideoWithAnyText.asyncLipsyncTts({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.LipsyncTtsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `LipsyncVideoWithAnyText.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.lipsyncVideoWithAnyText.statusLipsyncTts({ ...params }) -> Gooey.LipsyncTtsPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.lipsyncVideoWithAnyText.statusLipsyncTts({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusLipsyncTtsRequest` + +
+
+ +
+
+ +**requestOptions:** `LipsyncVideoWithAnyText.RequestOptions` + +
+
+
+
+ +
+
+
+ +## CompareAiVoiceGenerators + +
client.compareAiVoiceGenerators.textToSpeech({ ...params }) -> Gooey.TextToSpeechPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiVoiceGenerators.textToSpeech({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.TextToSpeechPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiVoiceGenerators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.compareAiVoiceGenerators.asyncTextToSpeech({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiVoiceGenerators.asyncTextToSpeech({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.TextToSpeechPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiVoiceGenerators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.compareAiVoiceGenerators.statusTextToSpeech({ ...params }) -> Gooey.TextToSpeechPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiVoiceGenerators.statusTextToSpeech({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusTextToSpeechRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiVoiceGenerators.RequestOptions` + +
+
+
+
+ +
+
+
+ +## SpeechRecognitionTranslation + +
client.speechRecognitionTranslation.asr({ ...params }) -> Gooey.AsrPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.speechRecognitionTranslation.asr({ + documents: ["documents"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.AsrPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SpeechRecognitionTranslation.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.speechRecognitionTranslation.asyncAsr({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.speechRecognitionTranslation.asyncAsr({ + documents: ["documents"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.AsrPageRequest` + +
+
+ +
+
+ +**requestOptions:** `SpeechRecognitionTranslation.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.speechRecognitionTranslation.statusAsr({ ...params }) -> Gooey.AsrPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.speechRecognitionTranslation.statusAsr({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusAsrRequest` + +
+
+ +
+
+ +**requestOptions:** `SpeechRecognitionTranslation.RequestOptions` + +
+
+
+
+ +
+
+
+ +## TextGuidedAudioGenerator + +
client.textGuidedAudioGenerator.text2Audio({ ...params }) -> Gooey.Text2AudioPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.textGuidedAudioGenerator.text2Audio({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.Text2AudioPageRequest` + +
+
+ +
+
+ +**requestOptions:** `TextGuidedAudioGenerator.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.textGuidedAudioGenerator.asyncText2Audio({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.textGuidedAudioGenerator.asyncText2Audio({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.Text2AudioPageRequest` + +
+
+ +
+
+ +**requestOptions:** `TextGuidedAudioGenerator.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.textGuidedAudioGenerator.statusText2Audio({ ...params }) -> Gooey.Text2AudioPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.textGuidedAudioGenerator.statusText2Audio({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusText2AudioRequest` + +
+
+ +
+
+ +**requestOptions:** `TextGuidedAudioGenerator.RequestOptions` + +
+
+
+
+ +
+
+
+ +## CompareAiTranslations + +
client.compareAiTranslations.translate({ ...params }) -> Gooey.TranslationPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiTranslations.translate({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.TranslationPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiTranslations.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.compareAiTranslations.asyncTranslate({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiTranslations.asyncTranslate({}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.TranslationPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiTranslations.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.compareAiTranslations.statusTranslate({ ...params }) -> Gooey.TranslationPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiTranslations.statusTranslate({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusTranslateRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiTranslations.RequestOptions` + +
+
+
+
+ +
+
+
+ +## EditAnImageWithAiPrompt + +
client.editAnImageWithAiPrompt.img2Img({ ...params }) -> Gooey.Img2ImgPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.editAnImageWithAiPrompt.img2Img({ + inputImage: "input_image", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.Img2ImgPageRequest` + +
+
+ +
+
+ +**requestOptions:** `EditAnImageWithAiPrompt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.editAnImageWithAiPrompt.asyncImg2Img({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.editAnImageWithAiPrompt.asyncImg2Img({ + inputImage: "input_image", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.Img2ImgPageRequest` + +
+
+ +
+
+ +**requestOptions:** `EditAnImageWithAiPrompt.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.editAnImageWithAiPrompt.statusImg2Img({ ...params }) -> Gooey.Img2ImgPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.editAnImageWithAiPrompt.statusImg2Img({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusImg2ImgRequest` + +
+
+ +
+
+ +**requestOptions:** `EditAnImageWithAiPrompt.RequestOptions` + +
+
+
+
+ +
+
+
+ +## CompareAiImageGenerators + +
client.compareAiImageGenerators.compareText2Img({ ...params }) -> Gooey.CompareText2ImgPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiImageGenerators.compareText2Img({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.CompareText2ImgPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiImageGenerators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.compareAiImageGenerators.asyncCompareText2Img({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiImageGenerators.asyncCompareText2Img({ + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.CompareText2ImgPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiImageGenerators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.compareAiImageGenerators.statusCompareText2Img({ ...params }) -> Gooey.CompareText2ImgPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiImageGenerators.statusCompareText2Img({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusCompareText2ImgRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiImageGenerators.RequestOptions` + +
+
+
+
+ +
+
+
+ +## GenerateProductPhotoBackgrounds + +
client.generateProductPhotoBackgrounds.objectInpainting({ ...params }) -> Gooey.ObjectInpaintingPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.generateProductPhotoBackgrounds.objectInpainting({ + inputImage: "input_image", + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.ObjectInpaintingPageRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateProductPhotoBackgrounds.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.generateProductPhotoBackgrounds.asyncObjectInpainting({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.generateProductPhotoBackgrounds.asyncObjectInpainting({ + inputImage: "input_image", + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.ObjectInpaintingPageRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateProductPhotoBackgrounds.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.generateProductPhotoBackgrounds.statusObjectInpainting({ ...params }) -> Gooey.ObjectInpaintingPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.generateProductPhotoBackgrounds.statusObjectInpainting({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusObjectInpaintingRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateProductPhotoBackgrounds.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AiImageWithAFace + +
client.aiImageWithAFace.faceInpainting({ ...params }) -> Gooey.FaceInpaintingPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiImageWithAFace.faceInpainting({ + inputImage: "input_image", + textPrompt: "tony stark from the iron man", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.FaceInpaintingPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiImageWithAFace.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiImageWithAFace.asyncFaceInpainting({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiImageWithAFace.asyncFaceInpainting({ + inputImage: "input_image", + textPrompt: "tony stark from the iron man", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.FaceInpaintingPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiImageWithAFace.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiImageWithAFace.statusFaceInpainting({ ...params }) -> Gooey.FaceInpaintingPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiImageWithAFace.statusFaceInpainting({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusFaceInpaintingRequest` + +
+
+ +
+
+ +**requestOptions:** `AiImageWithAFace.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AiGeneratedPhotoFromEmailProfileLookup + +
client.aiGeneratedPhotoFromEmailProfileLookup.emailFaceInpainting({ ...params }) -> Gooey.EmailFaceInpaintingPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiGeneratedPhotoFromEmailProfileLookup.emailFaceInpainting({ + emailAddress: "sean@dara.network", + textPrompt: "winter's day in paris", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.EmailFaceInpaintingPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiGeneratedPhotoFromEmailProfileLookup.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiGeneratedPhotoFromEmailProfileLookup.asyncEmailFaceInpainting({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiGeneratedPhotoFromEmailProfileLookup.asyncEmailFaceInpainting({ + emailAddress: "sean@dara.network", + textPrompt: "winter's day in paris", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.EmailFaceInpaintingPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiGeneratedPhotoFromEmailProfileLookup.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiGeneratedPhotoFromEmailProfileLookup.statusEmailFaceInpainting({ ...params }) -> Gooey.EmailFaceInpaintingPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiGeneratedPhotoFromEmailProfileLookup.statusEmailFaceInpainting({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusEmailFaceInpaintingRequest` + +
+
+ +
+
+ +**requestOptions:** `AiGeneratedPhotoFromEmailProfileLookup.RequestOptions` + +
+
+
+
+ +
+
+
+ +## RenderImageSearchResultsWithAi + +
client.renderImageSearchResultsWithAi.googleImageGen({ ...params }) -> Gooey.GoogleImageGenPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.renderImageSearchResultsWithAi.googleImageGen({ + searchQuery: "search_query", + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.GoogleImageGenPageRequest` + +
+
+ +
+
+ +**requestOptions:** `RenderImageSearchResultsWithAi.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.renderImageSearchResultsWithAi.asyncGoogleImageGen({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.renderImageSearchResultsWithAi.asyncGoogleImageGen({ + searchQuery: "search_query", + textPrompt: "text_prompt", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.GoogleImageGenPageRequest` + +
+
+ +
+
+ +**requestOptions:** `RenderImageSearchResultsWithAi.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.renderImageSearchResultsWithAi.statusGoogleImageGen({ ...params }) -> Gooey.GoogleImageGenPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.renderImageSearchResultsWithAi.statusGoogleImageGen({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusGoogleImageGenRequest` + +
+
+ +
+
+ +**requestOptions:** `RenderImageSearchResultsWithAi.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AiBackgroundChanger + +
client.aiBackgroundChanger.imageSegmentation({ ...params }) -> Gooey.ImageSegmentationPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiBackgroundChanger.imageSegmentation({ + inputImage: "input_image", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.ImageSegmentationPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiBackgroundChanger.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiBackgroundChanger.asyncImageSegmentation({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiBackgroundChanger.asyncImageSegmentation({ + inputImage: "input_image", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.ImageSegmentationPageRequest` + +
+
+ +
+
+ +**requestOptions:** `AiBackgroundChanger.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.aiBackgroundChanger.statusImageSegmentation({ ...params }) -> Gooey.ImageSegmentationPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.aiBackgroundChanger.statusImageSegmentation({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusImageSegmentationRequest` + +
+
+ +
+
+ +**requestOptions:** `AiBackgroundChanger.RequestOptions` + +
+
+
+
+ +
+
+
+ +## CompareAiImageUpscalers + +
client.compareAiImageUpscalers.compareAiUpscalers({ ...params }) -> Gooey.CompareUpscalerPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiImageUpscalers.compareAiUpscalers({ + scale: 1, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.CompareUpscalerPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiImageUpscalers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.compareAiImageUpscalers.asyncCompareAiUpscalers({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiImageUpscalers.asyncCompareAiUpscalers({ + scale: 1, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.CompareUpscalerPageRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiImageUpscalers.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.compareAiImageUpscalers.statusCompareAiUpscalers({ ...params }) -> Gooey.CompareUpscalerPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.compareAiImageUpscalers.statusCompareAiUpscalers({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusCompareAiUpscalersRequest` + +
+
+ +
+
+ +**requestOptions:** `CompareAiImageUpscalers.RequestOptions` + +
+
+
+
+ +
+
+
+ +## ChyronPlantBot + +
client.chyronPlantBot.chyronPlant({ ...params }) -> Gooey.ChyronPlantPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.chyronPlantBot.chyronPlant({ + midiNotes: "C#1 B6 A2 A1 A3 A2", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.ChyronPlantPageRequest` + +
+
+ +
+
+ +**requestOptions:** `ChyronPlantBot.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.chyronPlantBot.asyncChyronPlant({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.chyronPlantBot.asyncChyronPlant({ + midiNotes: "C#1 B6 A2 A1 A3 A2", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.ChyronPlantPageRequest` + +
+
+ +
+
+ +**requestOptions:** `ChyronPlantBot.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.chyronPlantBot.statusChyronPlant({ ...params }) -> Gooey.ChyronPlantPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.chyronPlantBot.statusChyronPlant({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusChyronPlantRequest` + +
+
+ +
+
+ +**requestOptions:** `ChyronPlantBot.RequestOptions` + +
+
+
+
+ +
+
+
+ +## LetterWriter + +
client.letterWriter.letterWriter({ ...params }) -> Gooey.LetterWriterPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.letterWriter.letterWriter({ + actionId: "action_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.LetterWriterPageRequest` + +
+
+ +
+
+ +**requestOptions:** `LetterWriter.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.letterWriter.asyncLetterWriter({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.letterWriter.asyncLetterWriter({ + actionId: "action_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.LetterWriterPageRequest` + +
+
+ +
+
+ +**requestOptions:** `LetterWriter.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.letterWriter.statusLetterWriter({ ...params }) -> Gooey.LetterWriterPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.letterWriter.statusLetterWriter({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusLetterWriterRequest` + +
+
+ +
+
+ +**requestOptions:** `LetterWriter.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Embeddings + +
client.embeddings.post({ ...params }) -> Gooey.EmbeddingsPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.embeddings.post({ + texts: ["texts"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.EmbeddingsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `Embeddings.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.embeddings.asyncEmbeddings({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.embeddings.asyncEmbeddings({ + texts: ["texts"], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.EmbeddingsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `Embeddings.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.embeddings.statusEmbeddings({ ...params }) -> Gooey.EmbeddingsPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.embeddings.statusEmbeddings({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusEmbeddingsRequest` + +
+
+ +
+
+ +**requestOptions:** `Embeddings.RequestOptions` + +
+
+
+
+ +
+
+
+ +## PeopleAlsoAskAnswersFromADoc + +
client.peopleAlsoAskAnswersFromADoc.relatedQnaMakerDoc({ ...params }) -> Gooey.RelatedQnADocPageResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.peopleAlsoAskAnswersFromADoc.relatedQnaMakerDoc({ + searchQuery: "search_query", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.RelatedQnADocPageRequest` + +
+
+ +
+
+ +**requestOptions:** `PeopleAlsoAskAnswersFromADoc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.peopleAlsoAskAnswersFromADoc.asyncRelatedQnaMakerDoc({ ...params }) -> Gooey.AsyncApiResponseModelV3 +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.peopleAlsoAskAnswersFromADoc.asyncRelatedQnaMakerDoc({ + searchQuery: "search_query", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.RelatedQnADocPageRequest` + +
+
+ +
+
+ +**requestOptions:** `PeopleAlsoAskAnswersFromADoc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.peopleAlsoAskAnswersFromADoc.statusRelatedQnaMakerDoc({ ...params }) -> Gooey.RelatedQnADocPageStatusResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.peopleAlsoAskAnswersFromADoc.statusRelatedQnaMakerDoc({ + runId: "run_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.StatusRelatedQnaMakerDocRequest` + +
+
+ +
+
+ +**requestOptions:** `PeopleAlsoAskAnswersFromADoc.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Misc + +
client.misc.getBalance() -> Gooey.BalanceResponse +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.misc.getBalance(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.misc.videoBotsBroadcast({ ...params }) -> unknown +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.misc.videoBotsBroadcast({ + text: "text", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Gooey.BotBroadcastRequestModel` + +
+
+ +
+
+ +**requestOptions:** `Misc.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.misc.health() -> unknown +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.misc.health(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Misc.RequestOptions` + +
+
+
+
+ +
+
+
diff --git a/src/Client.ts b/src/Client.ts new file mode 100644 index 0000000..bb523c3 --- /dev/null +++ b/src/Client.ts @@ -0,0 +1,282 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "./environments"; +import * as core from "./core"; +import { CopilotIntegrations } from "./api/resources/copilotIntegrations/client/Client"; +import { CopilotForYourEnterprise } from "./api/resources/copilotForYourEnterprise/client/Client"; +import { AiAnimationGenerator } from "./api/resources/aiAnimationGenerator/client/Client"; +import { AiArtQrCode } from "./api/resources/aiArtQrCode/client/Client"; +import { GeneratePeopleAlsoAskSeoContent } from "./api/resources/generatePeopleAlsoAskSeoContent/client/Client"; +import { CreateAPerfectSeoOptimizedTitleParagraph } from "./api/resources/createAPerfectSeoOptimizedTitleParagraph/client/Client"; +import { WebSearchGpt3 } from "./api/resources/webSearchGpt3/client/Client"; +import { ProfileLookupGpt3ForAiPersonalizedEmails } from "./api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/Client"; +import { BulkRunner } from "./api/resources/bulkRunner/client/Client"; +import { Evaluator } from "./api/resources/evaluator/client/Client"; +import { SyntheticDataMakerForVideosPdFs } from "./api/resources/syntheticDataMakerForVideosPdFs/client/Client"; +import { LargeLanguageModelsGpt3 } from "./api/resources/largeLanguageModelsGpt3/client/Client"; +import { SearchYourDocsWithGpt } from "./api/resources/searchYourDocsWithGpt/client/Client"; +import { SmartGpt } from "./api/resources/smartGpt/client/Client"; +import { SummarizeYourDocsWithGpt } from "./api/resources/summarizeYourDocsWithGpt/client/Client"; +import { Functions } from "./api/resources/functions/client/Client"; +import { LipSyncing } from "./api/resources/lipSyncing/client/Client"; +import { LipsyncVideoWithAnyText } from "./api/resources/lipsyncVideoWithAnyText/client/Client"; +import { CompareAiVoiceGenerators } from "./api/resources/compareAiVoiceGenerators/client/Client"; +import { SpeechRecognitionTranslation } from "./api/resources/speechRecognitionTranslation/client/Client"; +import { TextGuidedAudioGenerator } from "./api/resources/textGuidedAudioGenerator/client/Client"; +import { CompareAiTranslations } from "./api/resources/compareAiTranslations/client/Client"; +import { EditAnImageWithAiPrompt } from "./api/resources/editAnImageWithAiPrompt/client/Client"; +import { CompareAiImageGenerators } from "./api/resources/compareAiImageGenerators/client/Client"; +import { GenerateProductPhotoBackgrounds } from "./api/resources/generateProductPhotoBackgrounds/client/Client"; +import { AiImageWithAFace } from "./api/resources/aiImageWithAFace/client/Client"; +import { AiGeneratedPhotoFromEmailProfileLookup } from "./api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/Client"; +import { RenderImageSearchResultsWithAi } from "./api/resources/renderImageSearchResultsWithAi/client/Client"; +import { AiBackgroundChanger } from "./api/resources/aiBackgroundChanger/client/Client"; +import { CompareAiImageUpscalers } from "./api/resources/compareAiImageUpscalers/client/Client"; +import { ChyronPlantBot } from "./api/resources/chyronPlantBot/client/Client"; +import { LetterWriter } from "./api/resources/letterWriter/client/Client"; +import { Embeddings } from "./api/resources/embeddings/client/Client"; +import { PeopleAlsoAskAnswersFromADoc } from "./api/resources/peopleAlsoAskAnswersFromADoc/client/Client"; +import { Misc } from "./api/resources/misc/client/Client"; + +export declare namespace GooeyClient { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class GooeyClient { + constructor(protected readonly _options: GooeyClient.Options = {}) {} + + protected _copilotIntegrations: CopilotIntegrations | undefined; + + public get copilotIntegrations(): CopilotIntegrations { + return (this._copilotIntegrations ??= new CopilotIntegrations(this._options)); + } + + protected _copilotForYourEnterprise: CopilotForYourEnterprise | undefined; + + public get copilotForYourEnterprise(): CopilotForYourEnterprise { + return (this._copilotForYourEnterprise ??= new CopilotForYourEnterprise(this._options)); + } + + protected _aiAnimationGenerator: AiAnimationGenerator | undefined; + + public get aiAnimationGenerator(): AiAnimationGenerator { + return (this._aiAnimationGenerator ??= new AiAnimationGenerator(this._options)); + } + + protected _aiArtQrCode: AiArtQrCode | undefined; + + public get aiArtQrCode(): AiArtQrCode { + return (this._aiArtQrCode ??= new AiArtQrCode(this._options)); + } + + protected _generatePeopleAlsoAskSeoContent: GeneratePeopleAlsoAskSeoContent | undefined; + + public get generatePeopleAlsoAskSeoContent(): GeneratePeopleAlsoAskSeoContent { + return (this._generatePeopleAlsoAskSeoContent ??= new GeneratePeopleAlsoAskSeoContent(this._options)); + } + + protected _createAPerfectSeoOptimizedTitleParagraph: CreateAPerfectSeoOptimizedTitleParagraph | undefined; + + public get createAPerfectSeoOptimizedTitleParagraph(): CreateAPerfectSeoOptimizedTitleParagraph { + return (this._createAPerfectSeoOptimizedTitleParagraph ??= new CreateAPerfectSeoOptimizedTitleParagraph( + this._options + )); + } + + protected _webSearchGpt3: WebSearchGpt3 | undefined; + + public get webSearchGpt3(): WebSearchGpt3 { + return (this._webSearchGpt3 ??= new WebSearchGpt3(this._options)); + } + + protected _profileLookupGpt3ForAiPersonalizedEmails: ProfileLookupGpt3ForAiPersonalizedEmails | undefined; + + public get profileLookupGpt3ForAiPersonalizedEmails(): ProfileLookupGpt3ForAiPersonalizedEmails { + return (this._profileLookupGpt3ForAiPersonalizedEmails ??= new ProfileLookupGpt3ForAiPersonalizedEmails( + this._options + )); + } + + protected _bulkRunner: BulkRunner | undefined; + + public get bulkRunner(): BulkRunner { + return (this._bulkRunner ??= new BulkRunner(this._options)); + } + + protected _evaluator: Evaluator | undefined; + + public get evaluator(): Evaluator { + return (this._evaluator ??= new Evaluator(this._options)); + } + + protected _syntheticDataMakerForVideosPdFs: SyntheticDataMakerForVideosPdFs | undefined; + + public get syntheticDataMakerForVideosPdFs(): SyntheticDataMakerForVideosPdFs { + return (this._syntheticDataMakerForVideosPdFs ??= new SyntheticDataMakerForVideosPdFs(this._options)); + } + + protected _largeLanguageModelsGpt3: LargeLanguageModelsGpt3 | undefined; + + public get largeLanguageModelsGpt3(): LargeLanguageModelsGpt3 { + return (this._largeLanguageModelsGpt3 ??= new LargeLanguageModelsGpt3(this._options)); + } + + protected _searchYourDocsWithGpt: SearchYourDocsWithGpt | undefined; + + public get searchYourDocsWithGpt(): SearchYourDocsWithGpt { + return (this._searchYourDocsWithGpt ??= new SearchYourDocsWithGpt(this._options)); + } + + protected _smartGpt: SmartGpt | undefined; + + public get smartGpt(): SmartGpt { + return (this._smartGpt ??= new SmartGpt(this._options)); + } + + protected _summarizeYourDocsWithGpt: SummarizeYourDocsWithGpt | undefined; + + public get summarizeYourDocsWithGpt(): SummarizeYourDocsWithGpt { + return (this._summarizeYourDocsWithGpt ??= new SummarizeYourDocsWithGpt(this._options)); + } + + protected _functions: Functions | undefined; + + public get functions(): Functions { + return (this._functions ??= new Functions(this._options)); + } + + protected _lipSyncing: LipSyncing | undefined; + + public get lipSyncing(): LipSyncing { + return (this._lipSyncing ??= new LipSyncing(this._options)); + } + + protected _lipsyncVideoWithAnyText: LipsyncVideoWithAnyText | undefined; + + public get lipsyncVideoWithAnyText(): LipsyncVideoWithAnyText { + return (this._lipsyncVideoWithAnyText ??= new LipsyncVideoWithAnyText(this._options)); + } + + protected _compareAiVoiceGenerators: CompareAiVoiceGenerators | undefined; + + public get compareAiVoiceGenerators(): CompareAiVoiceGenerators { + return (this._compareAiVoiceGenerators ??= new CompareAiVoiceGenerators(this._options)); + } + + protected _speechRecognitionTranslation: SpeechRecognitionTranslation | undefined; + + public get speechRecognitionTranslation(): SpeechRecognitionTranslation { + return (this._speechRecognitionTranslation ??= new SpeechRecognitionTranslation(this._options)); + } + + protected _textGuidedAudioGenerator: TextGuidedAudioGenerator | undefined; + + public get textGuidedAudioGenerator(): TextGuidedAudioGenerator { + return (this._textGuidedAudioGenerator ??= new TextGuidedAudioGenerator(this._options)); + } + + protected _compareAiTranslations: CompareAiTranslations | undefined; + + public get compareAiTranslations(): CompareAiTranslations { + return (this._compareAiTranslations ??= new CompareAiTranslations(this._options)); + } + + protected _editAnImageWithAiPrompt: EditAnImageWithAiPrompt | undefined; + + public get editAnImageWithAiPrompt(): EditAnImageWithAiPrompt { + return (this._editAnImageWithAiPrompt ??= new EditAnImageWithAiPrompt(this._options)); + } + + protected _compareAiImageGenerators: CompareAiImageGenerators | undefined; + + public get compareAiImageGenerators(): CompareAiImageGenerators { + return (this._compareAiImageGenerators ??= new CompareAiImageGenerators(this._options)); + } + + protected _generateProductPhotoBackgrounds: GenerateProductPhotoBackgrounds | undefined; + + public get generateProductPhotoBackgrounds(): GenerateProductPhotoBackgrounds { + return (this._generateProductPhotoBackgrounds ??= new GenerateProductPhotoBackgrounds(this._options)); + } + + protected _aiImageWithAFace: AiImageWithAFace | undefined; + + public get aiImageWithAFace(): AiImageWithAFace { + return (this._aiImageWithAFace ??= new AiImageWithAFace(this._options)); + } + + protected _aiGeneratedPhotoFromEmailProfileLookup: AiGeneratedPhotoFromEmailProfileLookup | undefined; + + public get aiGeneratedPhotoFromEmailProfileLookup(): AiGeneratedPhotoFromEmailProfileLookup { + return (this._aiGeneratedPhotoFromEmailProfileLookup ??= new AiGeneratedPhotoFromEmailProfileLookup( + this._options + )); + } + + protected _renderImageSearchResultsWithAi: RenderImageSearchResultsWithAi | undefined; + + public get renderImageSearchResultsWithAi(): RenderImageSearchResultsWithAi { + return (this._renderImageSearchResultsWithAi ??= new RenderImageSearchResultsWithAi(this._options)); + } + + protected _aiBackgroundChanger: AiBackgroundChanger | undefined; + + public get aiBackgroundChanger(): AiBackgroundChanger { + return (this._aiBackgroundChanger ??= new AiBackgroundChanger(this._options)); + } + + protected _compareAiImageUpscalers: CompareAiImageUpscalers | undefined; + + public get compareAiImageUpscalers(): CompareAiImageUpscalers { + return (this._compareAiImageUpscalers ??= new CompareAiImageUpscalers(this._options)); + } + + protected _chyronPlantBot: ChyronPlantBot | undefined; + + public get chyronPlantBot(): ChyronPlantBot { + return (this._chyronPlantBot ??= new ChyronPlantBot(this._options)); + } + + protected _letterWriter: LetterWriter | undefined; + + public get letterWriter(): LetterWriter { + return (this._letterWriter ??= new LetterWriter(this._options)); + } + + protected _embeddings: Embeddings | undefined; + + public get embeddings(): Embeddings { + return (this._embeddings ??= new Embeddings(this._options)); + } + + protected _peopleAlsoAskAnswersFromADoc: PeopleAlsoAskAnswersFromADoc | undefined; + + public get peopleAlsoAskAnswersFromADoc(): PeopleAlsoAskAnswersFromADoc { + return (this._peopleAlsoAskAnswersFromADoc ??= new PeopleAlsoAskAnswersFromADoc(this._options)); + } + + protected _misc: Misc | undefined; + + public get misc(): Misc { + return (this._misc ??= new Misc(this._options)); + } +} diff --git a/src/api/errors/InternalServerError.ts b/src/api/errors/InternalServerError.ts new file mode 100644 index 0000000..06a69a3 --- /dev/null +++ b/src/api/errors/InternalServerError.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../errors/index"; +import * as Gooey from "../index"; + +export class InternalServerError extends errors.GooeyError { + constructor(body: Gooey.FailedReponseModelV2) { + super({ + message: "InternalServerError", + statusCode: 500, + body: body, + }); + Object.setPrototypeOf(this, InternalServerError.prototype); + } +} diff --git a/src/api/errors/PaymentRequiredError.ts b/src/api/errors/PaymentRequiredError.ts new file mode 100644 index 0000000..331e173 --- /dev/null +++ b/src/api/errors/PaymentRequiredError.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../errors/index"; + +export class PaymentRequiredError extends errors.GooeyError { + constructor(body?: unknown) { + super({ + message: "PaymentRequiredError", + statusCode: 402, + body: body, + }); + Object.setPrototypeOf(this, PaymentRequiredError.prototype); + } +} diff --git a/src/api/errors/TooManyRequestsError.ts b/src/api/errors/TooManyRequestsError.ts new file mode 100644 index 0000000..c7e7a84 --- /dev/null +++ b/src/api/errors/TooManyRequestsError.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../errors/index"; +import * as Gooey from "../index"; + +export class TooManyRequestsError extends errors.GooeyError { + constructor(body: Gooey.GenericErrorResponse) { + super({ + message: "TooManyRequestsError", + statusCode: 429, + body: body, + }); + Object.setPrototypeOf(this, TooManyRequestsError.prototype); + } +} diff --git a/src/api/errors/UnprocessableEntityError.ts b/src/api/errors/UnprocessableEntityError.ts new file mode 100644 index 0000000..478090e --- /dev/null +++ b/src/api/errors/UnprocessableEntityError.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as errors from "../../errors/index"; +import * as Gooey from "../index"; + +export class UnprocessableEntityError extends errors.GooeyError { + constructor(body: Gooey.HttpValidationError) { + super({ + message: "UnprocessableEntityError", + statusCode: 422, + body: body, + }); + Object.setPrototypeOf(this, UnprocessableEntityError.prototype); + } +} diff --git a/src/api/errors/index.ts b/src/api/errors/index.ts new file mode 100644 index 0000000..ff89aab --- /dev/null +++ b/src/api/errors/index.ts @@ -0,0 +1,4 @@ +export * from "./PaymentRequiredError"; +export * from "./UnprocessableEntityError"; +export * from "./TooManyRequestsError"; +export * from "./InternalServerError"; diff --git a/src/api/index.ts b/src/api/index.ts new file mode 100644 index 0000000..3006072 --- /dev/null +++ b/src/api/index.ts @@ -0,0 +1,3 @@ +export * from "./resources"; +export * from "./types"; +export * from "./errors"; diff --git a/src/api/resources/aiAnimationGenerator/client/Client.ts b/src/api/resources/aiAnimationGenerator/client/Client.ts new file mode 100644 index 0000000..5d989fd --- /dev/null +++ b/src/api/resources/aiAnimationGenerator/client/Client.ts @@ -0,0 +1,359 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace AiAnimationGenerator { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class AiAnimationGenerator { + constructor(protected readonly _options: AiAnimationGenerator.Options = {}) {} + + /** + * @param {Gooey.DeforumSdPageRequest} request + * @param {AiAnimationGenerator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.aiAnimationGenerator.deforumSd({ + * animationPrompts: [{ + * frame: "frame", + * prompt: "prompt" + * }] + * }) + */ + public async deforumSd( + request: Gooey.DeforumSdPageRequest, + requestOptions?: AiAnimationGenerator.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/DeforumSD/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.DeforumSdPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.DeforumSdPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.DeforumSdPageRequest} request + * @param {AiAnimationGenerator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiAnimationGenerator.asyncDeforumSd({ + * animationPrompts: [{ + * frame: "frame", + * prompt: "prompt" + * }] + * }) + */ + public async asyncDeforumSd( + request: Gooey.DeforumSdPageRequest, + requestOptions?: AiAnimationGenerator.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/DeforumSD/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.DeforumSdPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusDeforumSdRequest} request + * @param {AiAnimationGenerator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiAnimationGenerator.statusDeforumSd({ + * runId: "run_id" + * }) + */ + public async statusDeforumSd( + request: Gooey.StatusDeforumSdRequest, + requestOptions?: AiAnimationGenerator.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/DeforumSD/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.DeforumSdPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/aiAnimationGenerator/client/index.ts b/src/api/resources/aiAnimationGenerator/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/aiAnimationGenerator/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/aiAnimationGenerator/client/requests/StatusDeforumSdRequest.ts b/src/api/resources/aiAnimationGenerator/client/requests/StatusDeforumSdRequest.ts new file mode 100644 index 0000000..87292b7 --- /dev/null +++ b/src/api/resources/aiAnimationGenerator/client/requests/StatusDeforumSdRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusDeforumSdRequest { + runId: string; +} diff --git a/src/api/resources/aiAnimationGenerator/client/requests/index.ts b/src/api/resources/aiAnimationGenerator/client/requests/index.ts new file mode 100644 index 0000000..c07286a --- /dev/null +++ b/src/api/resources/aiAnimationGenerator/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusDeforumSdRequest } from "./StatusDeforumSdRequest"; diff --git a/src/api/resources/aiAnimationGenerator/index.ts b/src/api/resources/aiAnimationGenerator/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/aiAnimationGenerator/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/aiArtQrCode/client/Client.ts b/src/api/resources/aiArtQrCode/client/Client.ts new file mode 100644 index 0000000..0abaa0d --- /dev/null +++ b/src/api/resources/aiArtQrCode/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace AiArtQrCode { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class AiArtQrCode { + constructor(protected readonly _options: AiArtQrCode.Options = {}) {} + + /** + * @param {Gooey.QrCodeGeneratorPageRequest} request + * @param {AiArtQrCode.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.aiArtQrCode.artQrCode({ + * textPrompt: "text_prompt" + * }) + */ + public async artQrCode( + request: Gooey.QrCodeGeneratorPageRequest, + requestOptions?: AiArtQrCode.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/art-qr-code/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.QrCodeGeneratorPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.QrCodeGeneratorPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.QrCodeGeneratorPageRequest} request + * @param {AiArtQrCode.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiArtQrCode.asyncArtQrCode({ + * textPrompt: "text_prompt" + * }) + */ + public async asyncArtQrCode( + request: Gooey.QrCodeGeneratorPageRequest, + requestOptions?: AiArtQrCode.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/art-qr-code/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.QrCodeGeneratorPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusArtQrCodeRequest} request + * @param {AiArtQrCode.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiArtQrCode.statusArtQrCode({ + * runId: "run_id" + * }) + */ + public async statusArtQrCode( + request: Gooey.StatusArtQrCodeRequest, + requestOptions?: AiArtQrCode.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/art-qr-code/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.QrCodeGeneratorPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/aiArtQrCode/client/index.ts b/src/api/resources/aiArtQrCode/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/aiArtQrCode/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/aiArtQrCode/client/requests/StatusArtQrCodeRequest.ts b/src/api/resources/aiArtQrCode/client/requests/StatusArtQrCodeRequest.ts new file mode 100644 index 0000000..c433ee6 --- /dev/null +++ b/src/api/resources/aiArtQrCode/client/requests/StatusArtQrCodeRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusArtQrCodeRequest { + runId: string; +} diff --git a/src/api/resources/aiArtQrCode/client/requests/index.ts b/src/api/resources/aiArtQrCode/client/requests/index.ts new file mode 100644 index 0000000..c407e61 --- /dev/null +++ b/src/api/resources/aiArtQrCode/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusArtQrCodeRequest } from "./StatusArtQrCodeRequest"; diff --git a/src/api/resources/aiArtQrCode/index.ts b/src/api/resources/aiArtQrCode/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/aiArtQrCode/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/aiBackgroundChanger/client/Client.ts b/src/api/resources/aiBackgroundChanger/client/Client.ts new file mode 100644 index 0000000..e02f01c --- /dev/null +++ b/src/api/resources/aiBackgroundChanger/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace AiBackgroundChanger { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class AiBackgroundChanger { + constructor(protected readonly _options: AiBackgroundChanger.Options = {}) {} + + /** + * @param {Gooey.ImageSegmentationPageRequest} request + * @param {AiBackgroundChanger.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.aiBackgroundChanger.imageSegmentation({ + * inputImage: "input_image" + * }) + */ + public async imageSegmentation( + request: Gooey.ImageSegmentationPageRequest, + requestOptions?: AiBackgroundChanger.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/ImageSegmentation/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.ImageSegmentationPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ImageSegmentationPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.ImageSegmentationPageRequest} request + * @param {AiBackgroundChanger.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiBackgroundChanger.asyncImageSegmentation({ + * inputImage: "input_image" + * }) + */ + public async asyncImageSegmentation( + request: Gooey.ImageSegmentationPageRequest, + requestOptions?: AiBackgroundChanger.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/ImageSegmentation/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.ImageSegmentationPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusImageSegmentationRequest} request + * @param {AiBackgroundChanger.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiBackgroundChanger.statusImageSegmentation({ + * runId: "run_id" + * }) + */ + public async statusImageSegmentation( + request: Gooey.StatusImageSegmentationRequest, + requestOptions?: AiBackgroundChanger.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/ImageSegmentation/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ImageSegmentationPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/aiBackgroundChanger/client/index.ts b/src/api/resources/aiBackgroundChanger/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/aiBackgroundChanger/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/aiBackgroundChanger/client/requests/StatusImageSegmentationRequest.ts b/src/api/resources/aiBackgroundChanger/client/requests/StatusImageSegmentationRequest.ts new file mode 100644 index 0000000..a3763e2 --- /dev/null +++ b/src/api/resources/aiBackgroundChanger/client/requests/StatusImageSegmentationRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusImageSegmentationRequest { + runId: string; +} diff --git a/src/api/resources/aiBackgroundChanger/client/requests/index.ts b/src/api/resources/aiBackgroundChanger/client/requests/index.ts new file mode 100644 index 0000000..86a37b4 --- /dev/null +++ b/src/api/resources/aiBackgroundChanger/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusImageSegmentationRequest } from "./StatusImageSegmentationRequest"; diff --git a/src/api/resources/aiBackgroundChanger/index.ts b/src/api/resources/aiBackgroundChanger/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/aiBackgroundChanger/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/Client.ts b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/Client.ts new file mode 100644 index 0000000..32e4718 --- /dev/null +++ b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/Client.ts @@ -0,0 +1,355 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace AiGeneratedPhotoFromEmailProfileLookup { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class AiGeneratedPhotoFromEmailProfileLookup { + constructor(protected readonly _options: AiGeneratedPhotoFromEmailProfileLookup.Options = {}) {} + + /** + * @param {Gooey.EmailFaceInpaintingPageRequest} request + * @param {AiGeneratedPhotoFromEmailProfileLookup.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.aiGeneratedPhotoFromEmailProfileLookup.emailFaceInpainting({ + * emailAddress: "sean@dara.network", + * textPrompt: "winter's day in paris" + * }) + */ + public async emailFaceInpainting( + request: Gooey.EmailFaceInpaintingPageRequest, + requestOptions?: AiGeneratedPhotoFromEmailProfileLookup.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/EmailFaceInpainting/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.EmailFaceInpaintingPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.EmailFaceInpaintingPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.EmailFaceInpaintingPageRequest} request + * @param {AiGeneratedPhotoFromEmailProfileLookup.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiGeneratedPhotoFromEmailProfileLookup.asyncEmailFaceInpainting({ + * emailAddress: "sean@dara.network", + * textPrompt: "winter's day in paris" + * }) + */ + public async asyncEmailFaceInpainting( + request: Gooey.EmailFaceInpaintingPageRequest, + requestOptions?: AiGeneratedPhotoFromEmailProfileLookup.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/EmailFaceInpainting/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.EmailFaceInpaintingPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusEmailFaceInpaintingRequest} request + * @param {AiGeneratedPhotoFromEmailProfileLookup.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiGeneratedPhotoFromEmailProfileLookup.statusEmailFaceInpainting({ + * runId: "run_id" + * }) + */ + public async statusEmailFaceInpainting( + request: Gooey.StatusEmailFaceInpaintingRequest, + requestOptions?: AiGeneratedPhotoFromEmailProfileLookup.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/EmailFaceInpainting/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.EmailFaceInpaintingPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/index.ts b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/requests/StatusEmailFaceInpaintingRequest.ts b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/requests/StatusEmailFaceInpaintingRequest.ts new file mode 100644 index 0000000..c57ca13 --- /dev/null +++ b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/requests/StatusEmailFaceInpaintingRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusEmailFaceInpaintingRequest { + runId: string; +} diff --git a/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/requests/index.ts b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/requests/index.ts new file mode 100644 index 0000000..9dc765d --- /dev/null +++ b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusEmailFaceInpaintingRequest } from "./StatusEmailFaceInpaintingRequest"; diff --git a/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/index.ts b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/aiGeneratedPhotoFromEmailProfileLookup/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/aiImageWithAFace/client/Client.ts b/src/api/resources/aiImageWithAFace/client/Client.ts new file mode 100644 index 0000000..8f6fc34 --- /dev/null +++ b/src/api/resources/aiImageWithAFace/client/Client.ts @@ -0,0 +1,355 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace AiImageWithAFace { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class AiImageWithAFace { + constructor(protected readonly _options: AiImageWithAFace.Options = {}) {} + + /** + * @param {Gooey.FaceInpaintingPageRequest} request + * @param {AiImageWithAFace.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.aiImageWithAFace.faceInpainting({ + * inputImage: "input_image", + * textPrompt: "tony stark from the iron man" + * }) + */ + public async faceInpainting( + request: Gooey.FaceInpaintingPageRequest, + requestOptions?: AiImageWithAFace.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/FaceInpainting/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.FaceInpaintingPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.FaceInpaintingPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.FaceInpaintingPageRequest} request + * @param {AiImageWithAFace.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiImageWithAFace.asyncFaceInpainting({ + * inputImage: "input_image", + * textPrompt: "tony stark from the iron man" + * }) + */ + public async asyncFaceInpainting( + request: Gooey.FaceInpaintingPageRequest, + requestOptions?: AiImageWithAFace.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/FaceInpainting/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.FaceInpaintingPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusFaceInpaintingRequest} request + * @param {AiImageWithAFace.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.aiImageWithAFace.statusFaceInpainting({ + * runId: "run_id" + * }) + */ + public async statusFaceInpainting( + request: Gooey.StatusFaceInpaintingRequest, + requestOptions?: AiImageWithAFace.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/FaceInpainting/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.FaceInpaintingPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/aiImageWithAFace/client/index.ts b/src/api/resources/aiImageWithAFace/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/aiImageWithAFace/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/aiImageWithAFace/client/requests/StatusFaceInpaintingRequest.ts b/src/api/resources/aiImageWithAFace/client/requests/StatusFaceInpaintingRequest.ts new file mode 100644 index 0000000..ee03839 --- /dev/null +++ b/src/api/resources/aiImageWithAFace/client/requests/StatusFaceInpaintingRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusFaceInpaintingRequest { + runId: string; +} diff --git a/src/api/resources/aiImageWithAFace/client/requests/index.ts b/src/api/resources/aiImageWithAFace/client/requests/index.ts new file mode 100644 index 0000000..7135cce --- /dev/null +++ b/src/api/resources/aiImageWithAFace/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusFaceInpaintingRequest } from "./StatusFaceInpaintingRequest"; diff --git a/src/api/resources/aiImageWithAFace/index.ts b/src/api/resources/aiImageWithAFace/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/aiImageWithAFace/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/bulkRunner/client/Client.ts b/src/api/resources/bulkRunner/client/Client.ts new file mode 100644 index 0000000..d1dcaca --- /dev/null +++ b/src/api/resources/bulkRunner/client/Client.ts @@ -0,0 +1,367 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace BulkRunner { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class BulkRunner { + constructor(protected readonly _options: BulkRunner.Options = {}) {} + + /** + * @param {Gooey.BulkRunnerPageRequest} request + * @param {BulkRunner.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.bulkRunner.post({ + * documents: ["documents"], + * runUrls: ["run_urls"], + * inputColumns: { + * "key": "value" + * }, + * outputColumns: { + * "key": "value" + * } + * }) + */ + public async post( + request: Gooey.BulkRunnerPageRequest, + requestOptions?: BulkRunner.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/bulk-runner/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.BulkRunnerPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.BulkRunnerPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.BulkRunnerPageRequest} request + * @param {BulkRunner.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.bulkRunner.asyncBulkRunner({ + * documents: ["documents"], + * runUrls: ["run_urls"], + * inputColumns: { + * "key": "value" + * }, + * outputColumns: { + * "key": "value" + * } + * }) + */ + public async asyncBulkRunner( + request: Gooey.BulkRunnerPageRequest, + requestOptions?: BulkRunner.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/bulk-runner/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.BulkRunnerPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusBulkRunnerRequest} request + * @param {BulkRunner.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.bulkRunner.statusBulkRunner({ + * runId: "run_id" + * }) + */ + public async statusBulkRunner( + request: Gooey.StatusBulkRunnerRequest, + requestOptions?: BulkRunner.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/bulk-runner/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.BulkRunnerPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/bulkRunner/client/index.ts b/src/api/resources/bulkRunner/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/bulkRunner/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/bulkRunner/client/requests/StatusBulkRunnerRequest.ts b/src/api/resources/bulkRunner/client/requests/StatusBulkRunnerRequest.ts new file mode 100644 index 0000000..eec8937 --- /dev/null +++ b/src/api/resources/bulkRunner/client/requests/StatusBulkRunnerRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusBulkRunnerRequest { + runId: string; +} diff --git a/src/api/resources/bulkRunner/client/requests/index.ts b/src/api/resources/bulkRunner/client/requests/index.ts new file mode 100644 index 0000000..b9b5369 --- /dev/null +++ b/src/api/resources/bulkRunner/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusBulkRunnerRequest } from "./StatusBulkRunnerRequest"; diff --git a/src/api/resources/bulkRunner/index.ts b/src/api/resources/bulkRunner/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/bulkRunner/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/chyronPlantBot/client/Client.ts b/src/api/resources/chyronPlantBot/client/Client.ts new file mode 100644 index 0000000..0abb446 --- /dev/null +++ b/src/api/resources/chyronPlantBot/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace ChyronPlantBot { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class ChyronPlantBot { + constructor(protected readonly _options: ChyronPlantBot.Options = {}) {} + + /** + * @param {Gooey.ChyronPlantPageRequest} request + * @param {ChyronPlantBot.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.chyronPlantBot.chyronPlant({ + * midiNotes: "C#1 B6 A2 A1 A3 A2" + * }) + */ + public async chyronPlant( + request: Gooey.ChyronPlantPageRequest, + requestOptions?: ChyronPlantBot.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/ChyronPlant/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.ChyronPlantPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ChyronPlantPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.ChyronPlantPageRequest} request + * @param {ChyronPlantBot.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.chyronPlantBot.asyncChyronPlant({ + * midiNotes: "C#1 B6 A2 A1 A3 A2" + * }) + */ + public async asyncChyronPlant( + request: Gooey.ChyronPlantPageRequest, + requestOptions?: ChyronPlantBot.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/ChyronPlant/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.ChyronPlantPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusChyronPlantRequest} request + * @param {ChyronPlantBot.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.chyronPlantBot.statusChyronPlant({ + * runId: "run_id" + * }) + */ + public async statusChyronPlant( + request: Gooey.StatusChyronPlantRequest, + requestOptions?: ChyronPlantBot.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/ChyronPlant/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ChyronPlantPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/chyronPlantBot/client/index.ts b/src/api/resources/chyronPlantBot/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/chyronPlantBot/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/chyronPlantBot/client/requests/StatusChyronPlantRequest.ts b/src/api/resources/chyronPlantBot/client/requests/StatusChyronPlantRequest.ts new file mode 100644 index 0000000..1cd802e --- /dev/null +++ b/src/api/resources/chyronPlantBot/client/requests/StatusChyronPlantRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusChyronPlantRequest { + runId: string; +} diff --git a/src/api/resources/chyronPlantBot/client/requests/index.ts b/src/api/resources/chyronPlantBot/client/requests/index.ts new file mode 100644 index 0000000..d1278dc --- /dev/null +++ b/src/api/resources/chyronPlantBot/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusChyronPlantRequest } from "./StatusChyronPlantRequest"; diff --git a/src/api/resources/chyronPlantBot/index.ts b/src/api/resources/chyronPlantBot/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/chyronPlantBot/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/compareAiImageGenerators/client/Client.ts b/src/api/resources/compareAiImageGenerators/client/Client.ts new file mode 100644 index 0000000..032cab0 --- /dev/null +++ b/src/api/resources/compareAiImageGenerators/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace CompareAiImageGenerators { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class CompareAiImageGenerators { + constructor(protected readonly _options: CompareAiImageGenerators.Options = {}) {} + + /** + * @param {Gooey.CompareText2ImgPageRequest} request + * @param {CompareAiImageGenerators.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.compareAiImageGenerators.compareText2Img({ + * textPrompt: "text_prompt" + * }) + */ + public async compareText2Img( + request: Gooey.CompareText2ImgPageRequest, + requestOptions?: CompareAiImageGenerators.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/CompareText2Img/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.CompareText2ImgPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CompareText2ImgPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.CompareText2ImgPageRequest} request + * @param {CompareAiImageGenerators.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.compareAiImageGenerators.asyncCompareText2Img({ + * textPrompt: "text_prompt" + * }) + */ + public async asyncCompareText2Img( + request: Gooey.CompareText2ImgPageRequest, + requestOptions?: CompareAiImageGenerators.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/CompareText2Img/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.CompareText2ImgPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusCompareText2ImgRequest} request + * @param {CompareAiImageGenerators.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.compareAiImageGenerators.statusCompareText2Img({ + * runId: "run_id" + * }) + */ + public async statusCompareText2Img( + request: Gooey.StatusCompareText2ImgRequest, + requestOptions?: CompareAiImageGenerators.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/CompareText2Img/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CompareText2ImgPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/compareAiImageGenerators/client/index.ts b/src/api/resources/compareAiImageGenerators/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/compareAiImageGenerators/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/compareAiImageGenerators/client/requests/StatusCompareText2ImgRequest.ts b/src/api/resources/compareAiImageGenerators/client/requests/StatusCompareText2ImgRequest.ts new file mode 100644 index 0000000..8e0fff5 --- /dev/null +++ b/src/api/resources/compareAiImageGenerators/client/requests/StatusCompareText2ImgRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusCompareText2ImgRequest { + runId: string; +} diff --git a/src/api/resources/compareAiImageGenerators/client/requests/index.ts b/src/api/resources/compareAiImageGenerators/client/requests/index.ts new file mode 100644 index 0000000..ad838db --- /dev/null +++ b/src/api/resources/compareAiImageGenerators/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusCompareText2ImgRequest } from "./StatusCompareText2ImgRequest"; diff --git a/src/api/resources/compareAiImageGenerators/index.ts b/src/api/resources/compareAiImageGenerators/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/compareAiImageGenerators/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/compareAiImageUpscalers/client/Client.ts b/src/api/resources/compareAiImageUpscalers/client/Client.ts new file mode 100644 index 0000000..cb74932 --- /dev/null +++ b/src/api/resources/compareAiImageUpscalers/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace CompareAiImageUpscalers { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class CompareAiImageUpscalers { + constructor(protected readonly _options: CompareAiImageUpscalers.Options = {}) {} + + /** + * @param {Gooey.CompareUpscalerPageRequest} request + * @param {CompareAiImageUpscalers.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.compareAiImageUpscalers.compareAiUpscalers({ + * scale: 1 + * }) + */ + public async compareAiUpscalers( + request: Gooey.CompareUpscalerPageRequest, + requestOptions?: CompareAiImageUpscalers.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/compare-ai-upscalers/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.CompareUpscalerPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CompareUpscalerPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.CompareUpscalerPageRequest} request + * @param {CompareAiImageUpscalers.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.compareAiImageUpscalers.asyncCompareAiUpscalers({ + * scale: 1 + * }) + */ + public async asyncCompareAiUpscalers( + request: Gooey.CompareUpscalerPageRequest, + requestOptions?: CompareAiImageUpscalers.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/compare-ai-upscalers/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.CompareUpscalerPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusCompareAiUpscalersRequest} request + * @param {CompareAiImageUpscalers.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.compareAiImageUpscalers.statusCompareAiUpscalers({ + * runId: "run_id" + * }) + */ + public async statusCompareAiUpscalers( + request: Gooey.StatusCompareAiUpscalersRequest, + requestOptions?: CompareAiImageUpscalers.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/compare-ai-upscalers/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CompareUpscalerPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/compareAiImageUpscalers/client/index.ts b/src/api/resources/compareAiImageUpscalers/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/compareAiImageUpscalers/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/compareAiImageUpscalers/client/requests/StatusCompareAiUpscalersRequest.ts b/src/api/resources/compareAiImageUpscalers/client/requests/StatusCompareAiUpscalersRequest.ts new file mode 100644 index 0000000..74694d2 --- /dev/null +++ b/src/api/resources/compareAiImageUpscalers/client/requests/StatusCompareAiUpscalersRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusCompareAiUpscalersRequest { + runId: string; +} diff --git a/src/api/resources/compareAiImageUpscalers/client/requests/index.ts b/src/api/resources/compareAiImageUpscalers/client/requests/index.ts new file mode 100644 index 0000000..bcdc6ae --- /dev/null +++ b/src/api/resources/compareAiImageUpscalers/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusCompareAiUpscalersRequest } from "./StatusCompareAiUpscalersRequest"; diff --git a/src/api/resources/compareAiImageUpscalers/index.ts b/src/api/resources/compareAiImageUpscalers/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/compareAiImageUpscalers/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/compareAiTranslations/client/Client.ts b/src/api/resources/compareAiTranslations/client/Client.ts new file mode 100644 index 0000000..345dc9e --- /dev/null +++ b/src/api/resources/compareAiTranslations/client/Client.ts @@ -0,0 +1,349 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace CompareAiTranslations { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class CompareAiTranslations { + constructor(protected readonly _options: CompareAiTranslations.Options = {}) {} + + /** + * @param {Gooey.TranslationPageRequest} request + * @param {CompareAiTranslations.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.compareAiTranslations.translate({}) + */ + public async translate( + request: Gooey.TranslationPageRequest, + requestOptions?: CompareAiTranslations.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/translate/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.TranslationPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.TranslationPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.TranslationPageRequest} request + * @param {CompareAiTranslations.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.compareAiTranslations.asyncTranslate({}) + */ + public async asyncTranslate( + request: Gooey.TranslationPageRequest, + requestOptions?: CompareAiTranslations.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/translate/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.TranslationPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusTranslateRequest} request + * @param {CompareAiTranslations.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.compareAiTranslations.statusTranslate({ + * runId: "run_id" + * }) + */ + public async statusTranslate( + request: Gooey.StatusTranslateRequest, + requestOptions?: CompareAiTranslations.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/translate/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.TranslationPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/compareAiTranslations/client/index.ts b/src/api/resources/compareAiTranslations/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/compareAiTranslations/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/compareAiTranslations/client/requests/StatusTranslateRequest.ts b/src/api/resources/compareAiTranslations/client/requests/StatusTranslateRequest.ts new file mode 100644 index 0000000..c6411ec --- /dev/null +++ b/src/api/resources/compareAiTranslations/client/requests/StatusTranslateRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusTranslateRequest { + runId: string; +} diff --git a/src/api/resources/compareAiTranslations/client/requests/index.ts b/src/api/resources/compareAiTranslations/client/requests/index.ts new file mode 100644 index 0000000..9133079 --- /dev/null +++ b/src/api/resources/compareAiTranslations/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusTranslateRequest } from "./StatusTranslateRequest"; diff --git a/src/api/resources/compareAiTranslations/index.ts b/src/api/resources/compareAiTranslations/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/compareAiTranslations/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/compareAiVoiceGenerators/client/Client.ts b/src/api/resources/compareAiVoiceGenerators/client/Client.ts new file mode 100644 index 0000000..ecac02d --- /dev/null +++ b/src/api/resources/compareAiVoiceGenerators/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace CompareAiVoiceGenerators { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class CompareAiVoiceGenerators { + constructor(protected readonly _options: CompareAiVoiceGenerators.Options = {}) {} + + /** + * @param {Gooey.TextToSpeechPageRequest} request + * @param {CompareAiVoiceGenerators.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.compareAiVoiceGenerators.textToSpeech({ + * textPrompt: "text_prompt" + * }) + */ + public async textToSpeech( + request: Gooey.TextToSpeechPageRequest, + requestOptions?: CompareAiVoiceGenerators.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/TextToSpeech/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.TextToSpeechPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.TextToSpeechPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.TextToSpeechPageRequest} request + * @param {CompareAiVoiceGenerators.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.compareAiVoiceGenerators.asyncTextToSpeech({ + * textPrompt: "text_prompt" + * }) + */ + public async asyncTextToSpeech( + request: Gooey.TextToSpeechPageRequest, + requestOptions?: CompareAiVoiceGenerators.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/TextToSpeech/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.TextToSpeechPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusTextToSpeechRequest} request + * @param {CompareAiVoiceGenerators.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.compareAiVoiceGenerators.statusTextToSpeech({ + * runId: "run_id" + * }) + */ + public async statusTextToSpeech( + request: Gooey.StatusTextToSpeechRequest, + requestOptions?: CompareAiVoiceGenerators.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/TextToSpeech/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.TextToSpeechPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/compareAiVoiceGenerators/client/index.ts b/src/api/resources/compareAiVoiceGenerators/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/compareAiVoiceGenerators/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/compareAiVoiceGenerators/client/requests/StatusTextToSpeechRequest.ts b/src/api/resources/compareAiVoiceGenerators/client/requests/StatusTextToSpeechRequest.ts new file mode 100644 index 0000000..8309b35 --- /dev/null +++ b/src/api/resources/compareAiVoiceGenerators/client/requests/StatusTextToSpeechRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusTextToSpeechRequest { + runId: string; +} diff --git a/src/api/resources/compareAiVoiceGenerators/client/requests/index.ts b/src/api/resources/compareAiVoiceGenerators/client/requests/index.ts new file mode 100644 index 0000000..4524caa --- /dev/null +++ b/src/api/resources/compareAiVoiceGenerators/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusTextToSpeechRequest } from "./StatusTextToSpeechRequest"; diff --git a/src/api/resources/compareAiVoiceGenerators/index.ts b/src/api/resources/compareAiVoiceGenerators/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/compareAiVoiceGenerators/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/copilotForYourEnterprise/client/Client.ts b/src/api/resources/copilotForYourEnterprise/client/Client.ts new file mode 100644 index 0000000..1c4e1cc --- /dev/null +++ b/src/api/resources/copilotForYourEnterprise/client/Client.ts @@ -0,0 +1,349 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace CopilotForYourEnterprise { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class CopilotForYourEnterprise { + constructor(protected readonly _options: CopilotForYourEnterprise.Options = {}) {} + + /** + * @param {Gooey.VideoBotsPageRequest} request + * @param {CopilotForYourEnterprise.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.copilotForYourEnterprise.videoBots({}) + */ + public async videoBots( + request: Gooey.VideoBotsPageRequest, + requestOptions?: CopilotForYourEnterprise.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/video-bots/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.VideoBotsPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.VideoBotsPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.VideoBotsPageRequest} request + * @param {CopilotForYourEnterprise.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.copilotForYourEnterprise.asyncVideoBots({}) + */ + public async asyncVideoBots( + request: Gooey.VideoBotsPageRequest, + requestOptions?: CopilotForYourEnterprise.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/video-bots/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.VideoBotsPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusVideoBotsRequest} request + * @param {CopilotForYourEnterprise.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.copilotForYourEnterprise.statusVideoBots({ + * runId: "run_id" + * }) + */ + public async statusVideoBots( + request: Gooey.StatusVideoBotsRequest, + requestOptions?: CopilotForYourEnterprise.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/video-bots/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.VideoBotsPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/copilotForYourEnterprise/client/index.ts b/src/api/resources/copilotForYourEnterprise/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/copilotForYourEnterprise/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/copilotForYourEnterprise/client/requests/StatusVideoBotsRequest.ts b/src/api/resources/copilotForYourEnterprise/client/requests/StatusVideoBotsRequest.ts new file mode 100644 index 0000000..9716870 --- /dev/null +++ b/src/api/resources/copilotForYourEnterprise/client/requests/StatusVideoBotsRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusVideoBotsRequest { + runId: string; +} diff --git a/src/api/resources/copilotForYourEnterprise/client/requests/index.ts b/src/api/resources/copilotForYourEnterprise/client/requests/index.ts new file mode 100644 index 0000000..0af344c --- /dev/null +++ b/src/api/resources/copilotForYourEnterprise/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusVideoBotsRequest } from "./StatusVideoBotsRequest"; diff --git a/src/api/resources/copilotForYourEnterprise/index.ts b/src/api/resources/copilotForYourEnterprise/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/copilotForYourEnterprise/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/copilotIntegrations/client/Client.ts b/src/api/resources/copilotIntegrations/client/Client.ts new file mode 100644 index 0000000..b23fda2 --- /dev/null +++ b/src/api/resources/copilotIntegrations/client/Client.ts @@ -0,0 +1,218 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace CopilotIntegrations { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class CopilotIntegrations { + constructor(protected readonly _options: CopilotIntegrations.Options = {}) {} + + /** + * @param {Gooey.CreateStreamRequest} request + * @param {CopilotIntegrations.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * + * @example + * await client.copilotIntegrations.videoBotsStreamCreate({ + * integrationId: "integration_id" + * }) + */ + public async videoBotsStreamCreate( + request: Gooey.CreateStreamRequest, + requestOptions?: CopilotIntegrations.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/integrations/stream/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.CreateStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CreateStreamResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {string} requestId + * @param {CopilotIntegrations.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * + * @example + * await client.copilotIntegrations.videoBotsStream("request_id") + */ + public async videoBotsStream( + requestId: string, + requestOptions?: CopilotIntegrations.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + `v3/integrations/stream/${encodeURIComponent(requestId)}/` + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.VideoBotsStreamResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/copilotIntegrations/client/index.ts b/src/api/resources/copilotIntegrations/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/copilotIntegrations/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/copilotIntegrations/client/requests/CreateStreamRequest.ts b/src/api/resources/copilotIntegrations/client/requests/CreateStreamRequest.ts new file mode 100644 index 0000000..cb6cab5 --- /dev/null +++ b/src/api/resources/copilotIntegrations/client/requests/CreateStreamRequest.ts @@ -0,0 +1,120 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../../../../index"; + +/** + * @example + * { + * integrationId: "integration_id" + * } + */ +export interface CreateStreamRequest { + /** Your Integration ID as shown in the Copilot Integrations tab */ + integrationId: string; + /** + * The gooey conversation ID. + * + * If not provided, a new conversation will be started and a new ID will be returned in the response. Use this to maintain the state of the conversation between requests. + * + * Note that you may not provide a custom ID here, and must only use the `conversation_id` returned in a previous response. + */ + conversationId?: string; + /** + * Your app's custom user ID. + * + * If not provided, a random user will be created and a new ID will be returned in the response. If a `conversation_id` is provided, this field is automatically set to the user's id associated with that conversation. + */ + userId?: string; + /** + * Your app's custom message ID for the user message. + * + * If not provided, a random ID will be generated and returned in the response. This is useful for tracking messages in the conversation. + */ + userMessageId?: string; + /** The button that was pressed by the user. */ + buttonPressed?: Gooey.ButtonPressed; + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputPrompt?: string; + inputAudio?: string; + inputImages?: string[]; + inputDocuments?: string[]; + /** Select a workflow to extract text from documents and images. */ + docExtractUrl?: string; + messages?: Gooey.ConversationEntry[]; + botScript?: string; + selectedModel?: Gooey.CreateStreamRequestSelectedModel; + /** When your copilot users upload a photo or pdf, what kind of document are they mostly likely to upload? (via [Azure](https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/how-to-guides/use-sdk-rest-api?view=doc-intel-3.1.0&tabs=linux&pivots=programming-language-rest-api)) */ + documentModel?: string; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + taskInstructions?: string; + queryInstructions?: string; + keywordInstructions?: string; + documents?: string[]; + maxReferences?: number; + maxContextWords?: number; + scrollJump?: number; + embeddingModel?: Gooey.CreateStreamRequestEmbeddingModel; + /** + * Weightage for dense vs sparse embeddings. `0` for sparse, `1` for dense, `0.5` for equal weight. + * Generally speaking, dense embeddings excel at understanding the context of the query, whereas sparse vectors excel at keyword matches. + * + */ + denseWeight?: number; + citationStyle?: Gooey.CreateStreamRequestCitationStyle; + useUrlShortener?: boolean; + /** Choose a model to transcribe incoming audio messages to text. */ + asrModel?: Gooey.CreateStreamRequestAsrModel; + /** Choose a language to transcribe incoming audio messages to text. */ + asrLanguage?: string; + translationModel?: Gooey.CreateStreamRequestTranslationModel; + /** Choose a language to translate incoming text & audio messages to English and responses back to your selected language. Useful for low-resource languages. */ + userLanguage?: string; + /** + * Translation Glossary for User Langauge -> LLM Language (English) + * + */ + inputGlossaryDocument?: string; + /** + * Translation Glossary for LLM Language (English) -> User Langauge + * + */ + outputGlossaryDocument?: string; + lipsyncModel?: Gooey.CreateStreamRequestLipsyncModel; + /** Give your copilot superpowers by giving it access to tools. Powered by [Function calling](https://platform.openai.com/docs/guides/function-calling). */ + tools?: Gooey.LlmTools[]; + ttsProvider?: Gooey.CreateStreamRequestTtsProvider; + uberduckVoiceName?: string; + uberduckSpeakingRate?: number; + googleVoiceName?: string; + googleSpeakingRate?: number; + googlePitch?: number; + barkHistoryPrompt?: string; + /** Use `elevenlabs_voice_id` instead */ + elevenlabsVoiceName?: string; + elevenlabsApiKey?: string; + elevenlabsVoiceId?: string; + elevenlabsModel?: string; + elevenlabsStability?: number; + elevenlabsSimilarityBoost?: number; + elevenlabsStyle?: number; + elevenlabsSpeakerBoost?: boolean; + azureVoiceName?: string; + openaiVoiceName?: Gooey.CreateStreamRequestOpenaiVoiceName; + openaiTtsModel?: Gooey.CreateStreamRequestOpenaiTtsModel; + inputFace?: string; + facePaddingTop?: number; + facePaddingBottom?: number; + facePaddingLeft?: number; + facePaddingRight?: number; + sadtalkerSettings?: Gooey.SadTalkerSettings; + /** Use `input_prompt` instead */ + inputText?: string; +} diff --git a/src/api/resources/copilotIntegrations/client/requests/index.ts b/src/api/resources/copilotIntegrations/client/requests/index.ts new file mode 100644 index 0000000..23ce184 --- /dev/null +++ b/src/api/resources/copilotIntegrations/client/requests/index.ts @@ -0,0 +1 @@ +export { type CreateStreamRequest } from "./CreateStreamRequest"; diff --git a/src/api/resources/copilotIntegrations/index.ts b/src/api/resources/copilotIntegrations/index.ts new file mode 100644 index 0000000..c9240f8 --- /dev/null +++ b/src/api/resources/copilotIntegrations/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestAsrModel.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestAsrModel.ts new file mode 100644 index 0000000..1bb9e2e --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestAsrModel.ts @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Choose a model to transcribe incoming audio messages to text. + */ +export type CreateStreamRequestAsrModel = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; + +export const CreateStreamRequestAsrModel = { + WhisperLargeV2: "whisper_large_v2", + WhisperLargeV3: "whisper_large_v3", + WhisperHindiLargeV2: "whisper_hindi_large_v2", + WhisperTeluguLargeV2: "whisper_telugu_large_v2", + NemoEnglish: "nemo_english", + NemoHindi: "nemo_hindi", + VakyanshBhojpuri: "vakyansh_bhojpuri", + GcpV1: "gcp_v1", + Usm: "usm", + Deepgram: "deepgram", + Azure: "azure", + SeamlessM4T: "seamless_m4t", + Mms1BAll: "mms_1b_all", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestCitationStyle.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestCitationStyle.ts new file mode 100644 index 0000000..b39af08 --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestCitationStyle.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CreateStreamRequestCitationStyle = + | "number" + | "title" + | "url" + | "symbol" + | "markdown" + | "html" + | "slack_mrkdwn" + | "plaintext" + | "number_markdown" + | "number_html" + | "number_slack_mrkdwn" + | "number_plaintext" + | "symbol_markdown" + | "symbol_html" + | "symbol_slack_mrkdwn" + | "symbol_plaintext"; + +export const CreateStreamRequestCitationStyle = { + Number: "number", + Title: "title", + Url: "url", + Symbol: "symbol", + Markdown: "markdown", + Html: "html", + SlackMrkdwn: "slack_mrkdwn", + Plaintext: "plaintext", + NumberMarkdown: "number_markdown", + NumberHtml: "number_html", + NumberSlackMrkdwn: "number_slack_mrkdwn", + NumberPlaintext: "number_plaintext", + SymbolMarkdown: "symbol_markdown", + SymbolHtml: "symbol_html", + SymbolSlackMrkdwn: "symbol_slack_mrkdwn", + SymbolPlaintext: "symbol_plaintext", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestEmbeddingModel.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestEmbeddingModel.ts new file mode 100644 index 0000000..bcdb6f6 --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestEmbeddingModel.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CreateStreamRequestEmbeddingModel = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; + +export const CreateStreamRequestEmbeddingModel = { + Openai3Large: "openai_3_large", + Openai3Small: "openai_3_small", + OpenaiAda2: "openai_ada_2", + E5LargeV2: "e5_large_v2", + E5BaseV2: "e5_base_v2", + MultilingualE5Base: "multilingual_e5_base", + MultilingualE5Large: "multilingual_e5_large", + GteLarge: "gte_large", + GteBase: "gte_base", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestLipsyncModel.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestLipsyncModel.ts new file mode 100644 index 0000000..d5dd301 --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestLipsyncModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CreateStreamRequestLipsyncModel = "Wav2Lip" | "SadTalker"; + +export const CreateStreamRequestLipsyncModel = { + Wav2Lip: "Wav2Lip", + SadTalker: "SadTalker", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestOpenaiTtsModel.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestOpenaiTtsModel.ts new file mode 100644 index 0000000..c9913e9 --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestOpenaiTtsModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CreateStreamRequestOpenaiTtsModel = "tts_1" | "tts_1_hd"; + +export const CreateStreamRequestOpenaiTtsModel = { + Tts1: "tts_1", + Tts1Hd: "tts_1_hd", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestOpenaiVoiceName.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestOpenaiVoiceName.ts new file mode 100644 index 0000000..8f32f34 --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestOpenaiVoiceName.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CreateStreamRequestOpenaiVoiceName = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; + +export const CreateStreamRequestOpenaiVoiceName = { + Alloy: "alloy", + Echo: "echo", + Fable: "fable", + Onyx: "onyx", + Nova: "nova", + Shimmer: "shimmer", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestSelectedModel.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestSelectedModel.ts new file mode 100644 index 0000000..840a2b0 --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CreateStreamRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const CreateStreamRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestTranslationModel.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestTranslationModel.ts new file mode 100644 index 0000000..83531f2 --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestTranslationModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CreateStreamRequestTranslationModel = "google" | "ghana_nlp"; + +export const CreateStreamRequestTranslationModel = { + Google: "google", + GhanaNlp: "ghana_nlp", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/CreateStreamRequestTtsProvider.ts b/src/api/resources/copilotIntegrations/types/CreateStreamRequestTtsProvider.ts new file mode 100644 index 0000000..7a8709d --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/CreateStreamRequestTtsProvider.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CreateStreamRequestTtsProvider = + | "GOOGLE_TTS" + | "ELEVEN_LABS" + | "UBERDUCK" + | "BARK" + | "AZURE_TTS" + | "OPEN_AI"; + +export const CreateStreamRequestTtsProvider = { + GoogleTts: "GOOGLE_TTS", + ElevenLabs: "ELEVEN_LABS", + Uberduck: "UBERDUCK", + Bark: "BARK", + AzureTts: "AZURE_TTS", + OpenAi: "OPEN_AI", +} as const; diff --git a/src/api/resources/copilotIntegrations/types/VideoBotsStreamResponse.ts b/src/api/resources/copilotIntegrations/types/VideoBotsStreamResponse.ts new file mode 100644 index 0000000..71ddac8 --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/VideoBotsStreamResponse.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../../../index"; + +export type VideoBotsStreamResponse = + | Gooey.ConversationStart + | Gooey.RunStart + | Gooey.MessagePart + | Gooey.FinalResponse + | Gooey.StreamError; diff --git a/src/api/resources/copilotIntegrations/types/index.ts b/src/api/resources/copilotIntegrations/types/index.ts new file mode 100644 index 0000000..5429f0e --- /dev/null +++ b/src/api/resources/copilotIntegrations/types/index.ts @@ -0,0 +1,10 @@ +export * from "./CreateStreamRequestSelectedModel"; +export * from "./CreateStreamRequestEmbeddingModel"; +export * from "./CreateStreamRequestCitationStyle"; +export * from "./CreateStreamRequestAsrModel"; +export * from "./CreateStreamRequestTranslationModel"; +export * from "./CreateStreamRequestLipsyncModel"; +export * from "./CreateStreamRequestTtsProvider"; +export * from "./CreateStreamRequestOpenaiVoiceName"; +export * from "./CreateStreamRequestOpenaiTtsModel"; +export * from "./VideoBotsStreamResponse"; diff --git a/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/Client.ts b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/Client.ts new file mode 100644 index 0000000..13f99c3 --- /dev/null +++ b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/Client.ts @@ -0,0 +1,359 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace CreateAPerfectSeoOptimizedTitleParagraph { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class CreateAPerfectSeoOptimizedTitleParagraph { + constructor(protected readonly _options: CreateAPerfectSeoOptimizedTitleParagraph.Options = {}) {} + + /** + * @param {Gooey.SeoSummaryPageRequest} request + * @param {CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.createAPerfectSeoOptimizedTitleParagraph.seoSummary({ + * searchQuery: "search_query", + * keywords: "keywords", + * title: "title", + * companyUrl: "company_url" + * }) + */ + public async seoSummary( + request: Gooey.SeoSummaryPageRequest, + requestOptions?: CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/SEOSummary/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.SeoSummaryPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.SeoSummaryPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.SeoSummaryPageRequest} request + * @param {CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.createAPerfectSeoOptimizedTitleParagraph.asyncSeoSummary({ + * searchQuery: "search_query", + * keywords: "keywords", + * title: "title", + * companyUrl: "company_url" + * }) + */ + public async asyncSeoSummary( + request: Gooey.SeoSummaryPageRequest, + requestOptions?: CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/SEOSummary/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.SeoSummaryPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusSeoSummaryRequest} request + * @param {CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.createAPerfectSeoOptimizedTitleParagraph.statusSeoSummary({ + * runId: "run_id" + * }) + */ + public async statusSeoSummary( + request: Gooey.StatusSeoSummaryRequest, + requestOptions?: CreateAPerfectSeoOptimizedTitleParagraph.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/SEOSummary/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.SeoSummaryPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/index.ts b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/requests/StatusSeoSummaryRequest.ts b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/requests/StatusSeoSummaryRequest.ts new file mode 100644 index 0000000..3e8214d --- /dev/null +++ b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/requests/StatusSeoSummaryRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusSeoSummaryRequest { + runId: string; +} diff --git a/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/requests/index.ts b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/requests/index.ts new file mode 100644 index 0000000..22806d4 --- /dev/null +++ b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusSeoSummaryRequest } from "./StatusSeoSummaryRequest"; diff --git a/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/index.ts b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/createAPerfectSeoOptimizedTitleParagraph/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/editAnImageWithAiPrompt/client/Client.ts b/src/api/resources/editAnImageWithAiPrompt/client/Client.ts new file mode 100644 index 0000000..0ffad42 --- /dev/null +++ b/src/api/resources/editAnImageWithAiPrompt/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace EditAnImageWithAiPrompt { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class EditAnImageWithAiPrompt { + constructor(protected readonly _options: EditAnImageWithAiPrompt.Options = {}) {} + + /** + * @param {Gooey.Img2ImgPageRequest} request + * @param {EditAnImageWithAiPrompt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.editAnImageWithAiPrompt.img2Img({ + * inputImage: "input_image" + * }) + */ + public async img2Img( + request: Gooey.Img2ImgPageRequest, + requestOptions?: EditAnImageWithAiPrompt.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/Img2Img/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.Img2ImgPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Img2ImgPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.Img2ImgPageRequest} request + * @param {EditAnImageWithAiPrompt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.editAnImageWithAiPrompt.asyncImg2Img({ + * inputImage: "input_image" + * }) + */ + public async asyncImg2Img( + request: Gooey.Img2ImgPageRequest, + requestOptions?: EditAnImageWithAiPrompt.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/Img2Img/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.Img2ImgPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusImg2ImgRequest} request + * @param {EditAnImageWithAiPrompt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.editAnImageWithAiPrompt.statusImg2Img({ + * runId: "run_id" + * }) + */ + public async statusImg2Img( + request: Gooey.StatusImg2ImgRequest, + requestOptions?: EditAnImageWithAiPrompt.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/Img2Img/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Img2ImgPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/editAnImageWithAiPrompt/client/index.ts b/src/api/resources/editAnImageWithAiPrompt/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/editAnImageWithAiPrompt/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/editAnImageWithAiPrompt/client/requests/StatusImg2ImgRequest.ts b/src/api/resources/editAnImageWithAiPrompt/client/requests/StatusImg2ImgRequest.ts new file mode 100644 index 0000000..14c71ff --- /dev/null +++ b/src/api/resources/editAnImageWithAiPrompt/client/requests/StatusImg2ImgRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusImg2ImgRequest { + runId: string; +} diff --git a/src/api/resources/editAnImageWithAiPrompt/client/requests/index.ts b/src/api/resources/editAnImageWithAiPrompt/client/requests/index.ts new file mode 100644 index 0000000..586bd45 --- /dev/null +++ b/src/api/resources/editAnImageWithAiPrompt/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusImg2ImgRequest } from "./StatusImg2ImgRequest"; diff --git a/src/api/resources/editAnImageWithAiPrompt/index.ts b/src/api/resources/editAnImageWithAiPrompt/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/editAnImageWithAiPrompt/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/embeddings/client/Client.ts b/src/api/resources/embeddings/client/Client.ts new file mode 100644 index 0000000..dd8c79b --- /dev/null +++ b/src/api/resources/embeddings/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Embeddings { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class Embeddings { + constructor(protected readonly _options: Embeddings.Options = {}) {} + + /** + * @param {Gooey.EmbeddingsPageRequest} request + * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.embeddings.post({ + * texts: ["texts"] + * }) + */ + public async post( + request: Gooey.EmbeddingsPageRequest, + requestOptions?: Embeddings.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/embeddings/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.EmbeddingsPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.EmbeddingsPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.EmbeddingsPageRequest} request + * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.embeddings.asyncEmbeddings({ + * texts: ["texts"] + * }) + */ + public async asyncEmbeddings( + request: Gooey.EmbeddingsPageRequest, + requestOptions?: Embeddings.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/embeddings/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.EmbeddingsPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusEmbeddingsRequest} request + * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.embeddings.statusEmbeddings({ + * runId: "run_id" + * }) + */ + public async statusEmbeddings( + request: Gooey.StatusEmbeddingsRequest, + requestOptions?: Embeddings.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/embeddings/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.EmbeddingsPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/embeddings/client/index.ts b/src/api/resources/embeddings/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/embeddings/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/embeddings/client/requests/StatusEmbeddingsRequest.ts b/src/api/resources/embeddings/client/requests/StatusEmbeddingsRequest.ts new file mode 100644 index 0000000..ca63624 --- /dev/null +++ b/src/api/resources/embeddings/client/requests/StatusEmbeddingsRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusEmbeddingsRequest { + runId: string; +} diff --git a/src/api/resources/embeddings/client/requests/index.ts b/src/api/resources/embeddings/client/requests/index.ts new file mode 100644 index 0000000..e45c447 --- /dev/null +++ b/src/api/resources/embeddings/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusEmbeddingsRequest } from "./StatusEmbeddingsRequest"; diff --git a/src/api/resources/embeddings/index.ts b/src/api/resources/embeddings/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/embeddings/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/evaluator/client/Client.ts b/src/api/resources/evaluator/client/Client.ts new file mode 100644 index 0000000..680eed1 --- /dev/null +++ b/src/api/resources/evaluator/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Evaluator { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class Evaluator { + constructor(protected readonly _options: Evaluator.Options = {}) {} + + /** + * @param {Gooey.BulkEvalPageRequest} request + * @param {Evaluator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.evaluator.bulkEval({ + * documents: ["documents"] + * }) + */ + public async bulkEval( + request: Gooey.BulkEvalPageRequest, + requestOptions?: Evaluator.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/bulk-eval/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.BulkEvalPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.BulkEvalPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.BulkEvalPageRequest} request + * @param {Evaluator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.evaluator.asyncBulkEval({ + * documents: ["documents"] + * }) + */ + public async asyncBulkEval( + request: Gooey.BulkEvalPageRequest, + requestOptions?: Evaluator.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/bulk-eval/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.BulkEvalPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusBulkEvalRequest} request + * @param {Evaluator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.evaluator.statusBulkEval({ + * runId: "run_id" + * }) + */ + public async statusBulkEval( + request: Gooey.StatusBulkEvalRequest, + requestOptions?: Evaluator.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/bulk-eval/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.BulkEvalPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/evaluator/client/index.ts b/src/api/resources/evaluator/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/evaluator/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/evaluator/client/requests/StatusBulkEvalRequest.ts b/src/api/resources/evaluator/client/requests/StatusBulkEvalRequest.ts new file mode 100644 index 0000000..e255f2c --- /dev/null +++ b/src/api/resources/evaluator/client/requests/StatusBulkEvalRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusBulkEvalRequest { + runId: string; +} diff --git a/src/api/resources/evaluator/client/requests/index.ts b/src/api/resources/evaluator/client/requests/index.ts new file mode 100644 index 0000000..f2b0115 --- /dev/null +++ b/src/api/resources/evaluator/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusBulkEvalRequest } from "./StatusBulkEvalRequest"; diff --git a/src/api/resources/evaluator/index.ts b/src/api/resources/evaluator/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/evaluator/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/functions/client/Client.ts b/src/api/resources/functions/client/Client.ts new file mode 100644 index 0000000..7ebfc71 --- /dev/null +++ b/src/api/resources/functions/client/Client.ts @@ -0,0 +1,349 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace Functions { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class Functions { + constructor(protected readonly _options: Functions.Options = {}) {} + + /** + * @param {Gooey.FunctionsPageRequest} request + * @param {Functions.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.functions.post({}) + */ + public async post( + request: Gooey.FunctionsPageRequest, + requestOptions?: Functions.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/functions/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.FunctionsPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.FunctionsPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.FunctionsPageRequest} request + * @param {Functions.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.functions.asyncFunctions({}) + */ + public async asyncFunctions( + request: Gooey.FunctionsPageRequest, + requestOptions?: Functions.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/functions/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.FunctionsPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusFunctionsRequest} request + * @param {Functions.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.functions.statusFunctions({ + * runId: "run_id" + * }) + */ + public async statusFunctions( + request: Gooey.StatusFunctionsRequest, + requestOptions?: Functions.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/functions/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.FunctionsPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/functions/client/index.ts b/src/api/resources/functions/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/functions/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/functions/client/requests/StatusFunctionsRequest.ts b/src/api/resources/functions/client/requests/StatusFunctionsRequest.ts new file mode 100644 index 0000000..b1b78f5 --- /dev/null +++ b/src/api/resources/functions/client/requests/StatusFunctionsRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusFunctionsRequest { + runId: string; +} diff --git a/src/api/resources/functions/client/requests/index.ts b/src/api/resources/functions/client/requests/index.ts new file mode 100644 index 0000000..72ec7eb --- /dev/null +++ b/src/api/resources/functions/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusFunctionsRequest } from "./StatusFunctionsRequest"; diff --git a/src/api/resources/functions/index.ts b/src/api/resources/functions/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/functions/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/generatePeopleAlsoAskSeoContent/client/Client.ts b/src/api/resources/generatePeopleAlsoAskSeoContent/client/Client.ts new file mode 100644 index 0000000..73b89f1 --- /dev/null +++ b/src/api/resources/generatePeopleAlsoAskSeoContent/client/Client.ts @@ -0,0 +1,355 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace GeneratePeopleAlsoAskSeoContent { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class GeneratePeopleAlsoAskSeoContent { + constructor(protected readonly _options: GeneratePeopleAlsoAskSeoContent.Options = {}) {} + + /** + * @param {Gooey.RelatedQnAPageRequest} request + * @param {GeneratePeopleAlsoAskSeoContent.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.generatePeopleAlsoAskSeoContent.relatedQnaMaker({ + * searchQuery: "search_query", + * siteFilter: "site_filter" + * }) + */ + public async relatedQnaMaker( + request: Gooey.RelatedQnAPageRequest, + requestOptions?: GeneratePeopleAlsoAskSeoContent.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/related-qna-maker/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.RelatedQnAPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.RelatedQnAPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.RelatedQnAPageRequest} request + * @param {GeneratePeopleAlsoAskSeoContent.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.generatePeopleAlsoAskSeoContent.asyncRelatedQnaMaker({ + * searchQuery: "search_query", + * siteFilter: "site_filter" + * }) + */ + public async asyncRelatedQnaMaker( + request: Gooey.RelatedQnAPageRequest, + requestOptions?: GeneratePeopleAlsoAskSeoContent.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/related-qna-maker/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.RelatedQnAPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusRelatedQnaMakerRequest} request + * @param {GeneratePeopleAlsoAskSeoContent.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.generatePeopleAlsoAskSeoContent.statusRelatedQnaMaker({ + * runId: "run_id" + * }) + */ + public async statusRelatedQnaMaker( + request: Gooey.StatusRelatedQnaMakerRequest, + requestOptions?: GeneratePeopleAlsoAskSeoContent.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/related-qna-maker/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.RelatedQnAPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/generatePeopleAlsoAskSeoContent/client/index.ts b/src/api/resources/generatePeopleAlsoAskSeoContent/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/generatePeopleAlsoAskSeoContent/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/generatePeopleAlsoAskSeoContent/client/requests/StatusRelatedQnaMakerRequest.ts b/src/api/resources/generatePeopleAlsoAskSeoContent/client/requests/StatusRelatedQnaMakerRequest.ts new file mode 100644 index 0000000..dad50ad --- /dev/null +++ b/src/api/resources/generatePeopleAlsoAskSeoContent/client/requests/StatusRelatedQnaMakerRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusRelatedQnaMakerRequest { + runId: string; +} diff --git a/src/api/resources/generatePeopleAlsoAskSeoContent/client/requests/index.ts b/src/api/resources/generatePeopleAlsoAskSeoContent/client/requests/index.ts new file mode 100644 index 0000000..940c0ba --- /dev/null +++ b/src/api/resources/generatePeopleAlsoAskSeoContent/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusRelatedQnaMakerRequest } from "./StatusRelatedQnaMakerRequest"; diff --git a/src/api/resources/generatePeopleAlsoAskSeoContent/index.ts b/src/api/resources/generatePeopleAlsoAskSeoContent/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/generatePeopleAlsoAskSeoContent/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/generateProductPhotoBackgrounds/client/Client.ts b/src/api/resources/generateProductPhotoBackgrounds/client/Client.ts new file mode 100644 index 0000000..5e2133d --- /dev/null +++ b/src/api/resources/generateProductPhotoBackgrounds/client/Client.ts @@ -0,0 +1,355 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace GenerateProductPhotoBackgrounds { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class GenerateProductPhotoBackgrounds { + constructor(protected readonly _options: GenerateProductPhotoBackgrounds.Options = {}) {} + + /** + * @param {Gooey.ObjectInpaintingPageRequest} request + * @param {GenerateProductPhotoBackgrounds.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.generateProductPhotoBackgrounds.objectInpainting({ + * inputImage: "input_image", + * textPrompt: "text_prompt" + * }) + */ + public async objectInpainting( + request: Gooey.ObjectInpaintingPageRequest, + requestOptions?: GenerateProductPhotoBackgrounds.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/ObjectInpainting/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.ObjectInpaintingPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ObjectInpaintingPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.ObjectInpaintingPageRequest} request + * @param {GenerateProductPhotoBackgrounds.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.generateProductPhotoBackgrounds.asyncObjectInpainting({ + * inputImage: "input_image", + * textPrompt: "text_prompt" + * }) + */ + public async asyncObjectInpainting( + request: Gooey.ObjectInpaintingPageRequest, + requestOptions?: GenerateProductPhotoBackgrounds.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/ObjectInpainting/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.ObjectInpaintingPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusObjectInpaintingRequest} request + * @param {GenerateProductPhotoBackgrounds.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.generateProductPhotoBackgrounds.statusObjectInpainting({ + * runId: "run_id" + * }) + */ + public async statusObjectInpainting( + request: Gooey.StatusObjectInpaintingRequest, + requestOptions?: GenerateProductPhotoBackgrounds.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/ObjectInpainting/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ObjectInpaintingPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/generateProductPhotoBackgrounds/client/index.ts b/src/api/resources/generateProductPhotoBackgrounds/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/generateProductPhotoBackgrounds/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/generateProductPhotoBackgrounds/client/requests/StatusObjectInpaintingRequest.ts b/src/api/resources/generateProductPhotoBackgrounds/client/requests/StatusObjectInpaintingRequest.ts new file mode 100644 index 0000000..beac513 --- /dev/null +++ b/src/api/resources/generateProductPhotoBackgrounds/client/requests/StatusObjectInpaintingRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusObjectInpaintingRequest { + runId: string; +} diff --git a/src/api/resources/generateProductPhotoBackgrounds/client/requests/index.ts b/src/api/resources/generateProductPhotoBackgrounds/client/requests/index.ts new file mode 100644 index 0000000..99040de --- /dev/null +++ b/src/api/resources/generateProductPhotoBackgrounds/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusObjectInpaintingRequest } from "./StatusObjectInpaintingRequest"; diff --git a/src/api/resources/generateProductPhotoBackgrounds/index.ts b/src/api/resources/generateProductPhotoBackgrounds/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/generateProductPhotoBackgrounds/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts new file mode 100644 index 0000000..9d9e75c --- /dev/null +++ b/src/api/resources/index.ts @@ -0,0 +1,71 @@ +export * as copilotIntegrations from "./copilotIntegrations"; +export * from "./copilotIntegrations/types"; +export * as copilotForYourEnterprise from "./copilotForYourEnterprise"; +export * as aiAnimationGenerator from "./aiAnimationGenerator"; +export * as aiArtQrCode from "./aiArtQrCode"; +export * as generatePeopleAlsoAskSeoContent from "./generatePeopleAlsoAskSeoContent"; +export * as createAPerfectSeoOptimizedTitleParagraph from "./createAPerfectSeoOptimizedTitleParagraph"; +export * as webSearchGpt3 from "./webSearchGpt3"; +export * as profileLookupGpt3ForAiPersonalizedEmails from "./profileLookupGpt3ForAiPersonalizedEmails"; +export * as bulkRunner from "./bulkRunner"; +export * as evaluator from "./evaluator"; +export * as syntheticDataMakerForVideosPdFs from "./syntheticDataMakerForVideosPdFs"; +export * as largeLanguageModelsGpt3 from "./largeLanguageModelsGpt3"; +export * as searchYourDocsWithGpt from "./searchYourDocsWithGpt"; +export * as smartGpt from "./smartGpt"; +export * as summarizeYourDocsWithGpt from "./summarizeYourDocsWithGpt"; +export * as functions from "./functions"; +export * as lipSyncing from "./lipSyncing"; +export * as lipsyncVideoWithAnyText from "./lipsyncVideoWithAnyText"; +export * as compareAiVoiceGenerators from "./compareAiVoiceGenerators"; +export * as speechRecognitionTranslation from "./speechRecognitionTranslation"; +export * as textGuidedAudioGenerator from "./textGuidedAudioGenerator"; +export * as compareAiTranslations from "./compareAiTranslations"; +export * as editAnImageWithAiPrompt from "./editAnImageWithAiPrompt"; +export * as compareAiImageGenerators from "./compareAiImageGenerators"; +export * as generateProductPhotoBackgrounds from "./generateProductPhotoBackgrounds"; +export * as aiImageWithAFace from "./aiImageWithAFace"; +export * as aiGeneratedPhotoFromEmailProfileLookup from "./aiGeneratedPhotoFromEmailProfileLookup"; +export * as renderImageSearchResultsWithAi from "./renderImageSearchResultsWithAi"; +export * as aiBackgroundChanger from "./aiBackgroundChanger"; +export * as compareAiImageUpscalers from "./compareAiImageUpscalers"; +export * as chyronPlantBot from "./chyronPlantBot"; +export * as letterWriter from "./letterWriter"; +export * as embeddings from "./embeddings"; +export * as peopleAlsoAskAnswersFromADoc from "./peopleAlsoAskAnswersFromADoc"; +export * as misc from "./misc"; +export * from "./copilotIntegrations/client/requests"; +export * from "./copilotForYourEnterprise/client/requests"; +export * from "./aiAnimationGenerator/client/requests"; +export * from "./aiArtQrCode/client/requests"; +export * from "./generatePeopleAlsoAskSeoContent/client/requests"; +export * from "./createAPerfectSeoOptimizedTitleParagraph/client/requests"; +export * from "./webSearchGpt3/client/requests"; +export * from "./profileLookupGpt3ForAiPersonalizedEmails/client/requests"; +export * from "./bulkRunner/client/requests"; +export * from "./evaluator/client/requests"; +export * from "./syntheticDataMakerForVideosPdFs/client/requests"; +export * from "./largeLanguageModelsGpt3/client/requests"; +export * from "./searchYourDocsWithGpt/client/requests"; +export * from "./smartGpt/client/requests"; +export * from "./summarizeYourDocsWithGpt/client/requests"; +export * from "./functions/client/requests"; +export * from "./lipSyncing/client/requests"; +export * from "./lipsyncVideoWithAnyText/client/requests"; +export * from "./compareAiVoiceGenerators/client/requests"; +export * from "./speechRecognitionTranslation/client/requests"; +export * from "./textGuidedAudioGenerator/client/requests"; +export * from "./compareAiTranslations/client/requests"; +export * from "./editAnImageWithAiPrompt/client/requests"; +export * from "./compareAiImageGenerators/client/requests"; +export * from "./generateProductPhotoBackgrounds/client/requests"; +export * from "./aiImageWithAFace/client/requests"; +export * from "./aiGeneratedPhotoFromEmailProfileLookup/client/requests"; +export * from "./renderImageSearchResultsWithAi/client/requests"; +export * from "./aiBackgroundChanger/client/requests"; +export * from "./compareAiImageUpscalers/client/requests"; +export * from "./chyronPlantBot/client/requests"; +export * from "./letterWriter/client/requests"; +export * from "./embeddings/client/requests"; +export * from "./peopleAlsoAskAnswersFromADoc/client/requests"; +export * from "./misc/client/requests"; diff --git a/src/api/resources/largeLanguageModelsGpt3/client/Client.ts b/src/api/resources/largeLanguageModelsGpt3/client/Client.ts new file mode 100644 index 0000000..03c2d7d --- /dev/null +++ b/src/api/resources/largeLanguageModelsGpt3/client/Client.ts @@ -0,0 +1,349 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace LargeLanguageModelsGpt3 { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class LargeLanguageModelsGpt3 { + constructor(protected readonly _options: LargeLanguageModelsGpt3.Options = {}) {} + + /** + * @param {Gooey.CompareLlmPageRequest} request + * @param {LargeLanguageModelsGpt3.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.largeLanguageModelsGpt3.compareLlm({}) + */ + public async compareLlm( + request: Gooey.CompareLlmPageRequest, + requestOptions?: LargeLanguageModelsGpt3.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/CompareLLM/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.CompareLlmPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CompareLlmPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.CompareLlmPageRequest} request + * @param {LargeLanguageModelsGpt3.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.largeLanguageModelsGpt3.asyncCompareLlm({}) + */ + public async asyncCompareLlm( + request: Gooey.CompareLlmPageRequest, + requestOptions?: LargeLanguageModelsGpt3.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/CompareLLM/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.CompareLlmPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusCompareLlmRequest} request + * @param {LargeLanguageModelsGpt3.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.largeLanguageModelsGpt3.statusCompareLlm({ + * runId: "run_id" + * }) + */ + public async statusCompareLlm( + request: Gooey.StatusCompareLlmRequest, + requestOptions?: LargeLanguageModelsGpt3.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/CompareLLM/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CompareLlmPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/largeLanguageModelsGpt3/client/index.ts b/src/api/resources/largeLanguageModelsGpt3/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/largeLanguageModelsGpt3/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/largeLanguageModelsGpt3/client/requests/StatusCompareLlmRequest.ts b/src/api/resources/largeLanguageModelsGpt3/client/requests/StatusCompareLlmRequest.ts new file mode 100644 index 0000000..fa3a066 --- /dev/null +++ b/src/api/resources/largeLanguageModelsGpt3/client/requests/StatusCompareLlmRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusCompareLlmRequest { + runId: string; +} diff --git a/src/api/resources/largeLanguageModelsGpt3/client/requests/index.ts b/src/api/resources/largeLanguageModelsGpt3/client/requests/index.ts new file mode 100644 index 0000000..178d80e --- /dev/null +++ b/src/api/resources/largeLanguageModelsGpt3/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusCompareLlmRequest } from "./StatusCompareLlmRequest"; diff --git a/src/api/resources/largeLanguageModelsGpt3/index.ts b/src/api/resources/largeLanguageModelsGpt3/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/largeLanguageModelsGpt3/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/letterWriter/client/Client.ts b/src/api/resources/letterWriter/client/Client.ts new file mode 100644 index 0000000..042da2d --- /dev/null +++ b/src/api/resources/letterWriter/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace LetterWriter { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class LetterWriter { + constructor(protected readonly _options: LetterWriter.Options = {}) {} + + /** + * @param {Gooey.LetterWriterPageRequest} request + * @param {LetterWriter.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.letterWriter.letterWriter({ + * actionId: "action_id" + * }) + */ + public async letterWriter( + request: Gooey.LetterWriterPageRequest, + requestOptions?: LetterWriter.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/LetterWriter/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.LetterWriterPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.LetterWriterPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.LetterWriterPageRequest} request + * @param {LetterWriter.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.letterWriter.asyncLetterWriter({ + * actionId: "action_id" + * }) + */ + public async asyncLetterWriter( + request: Gooey.LetterWriterPageRequest, + requestOptions?: LetterWriter.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/LetterWriter/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.LetterWriterPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusLetterWriterRequest} request + * @param {LetterWriter.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.letterWriter.statusLetterWriter({ + * runId: "run_id" + * }) + */ + public async statusLetterWriter( + request: Gooey.StatusLetterWriterRequest, + requestOptions?: LetterWriter.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/LetterWriter/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.LetterWriterPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/letterWriter/client/index.ts b/src/api/resources/letterWriter/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/letterWriter/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/letterWriter/client/requests/StatusLetterWriterRequest.ts b/src/api/resources/letterWriter/client/requests/StatusLetterWriterRequest.ts new file mode 100644 index 0000000..d1549d1 --- /dev/null +++ b/src/api/resources/letterWriter/client/requests/StatusLetterWriterRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusLetterWriterRequest { + runId: string; +} diff --git a/src/api/resources/letterWriter/client/requests/index.ts b/src/api/resources/letterWriter/client/requests/index.ts new file mode 100644 index 0000000..784a0f3 --- /dev/null +++ b/src/api/resources/letterWriter/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusLetterWriterRequest } from "./StatusLetterWriterRequest"; diff --git a/src/api/resources/letterWriter/index.ts b/src/api/resources/letterWriter/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/letterWriter/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/lipSyncing/client/Client.ts b/src/api/resources/lipSyncing/client/Client.ts new file mode 100644 index 0000000..1062f71 --- /dev/null +++ b/src/api/resources/lipSyncing/client/Client.ts @@ -0,0 +1,349 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace LipSyncing { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class LipSyncing { + constructor(protected readonly _options: LipSyncing.Options = {}) {} + + /** + * @param {Gooey.LipsyncPageRequest} request + * @param {LipSyncing.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.lipSyncing.lipsync({}) + */ + public async lipsync( + request: Gooey.LipsyncPageRequest, + requestOptions?: LipSyncing.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/Lipsync/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.LipsyncPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.LipsyncPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.LipsyncPageRequest} request + * @param {LipSyncing.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.lipSyncing.asyncLipsync({}) + */ + public async asyncLipsync( + request: Gooey.LipsyncPageRequest, + requestOptions?: LipSyncing.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/Lipsync/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.LipsyncPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusLipsyncRequest} request + * @param {LipSyncing.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.lipSyncing.statusLipsync({ + * runId: "run_id" + * }) + */ + public async statusLipsync( + request: Gooey.StatusLipsyncRequest, + requestOptions?: LipSyncing.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/Lipsync/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.LipsyncPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/lipSyncing/client/index.ts b/src/api/resources/lipSyncing/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/lipSyncing/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/lipSyncing/client/requests/StatusLipsyncRequest.ts b/src/api/resources/lipSyncing/client/requests/StatusLipsyncRequest.ts new file mode 100644 index 0000000..1d0100f --- /dev/null +++ b/src/api/resources/lipSyncing/client/requests/StatusLipsyncRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusLipsyncRequest { + runId: string; +} diff --git a/src/api/resources/lipSyncing/client/requests/index.ts b/src/api/resources/lipSyncing/client/requests/index.ts new file mode 100644 index 0000000..6f132c7 --- /dev/null +++ b/src/api/resources/lipSyncing/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusLipsyncRequest } from "./StatusLipsyncRequest"; diff --git a/src/api/resources/lipSyncing/index.ts b/src/api/resources/lipSyncing/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/lipSyncing/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/lipsyncVideoWithAnyText/client/Client.ts b/src/api/resources/lipsyncVideoWithAnyText/client/Client.ts new file mode 100644 index 0000000..2a38148 --- /dev/null +++ b/src/api/resources/lipsyncVideoWithAnyText/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace LipsyncVideoWithAnyText { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class LipsyncVideoWithAnyText { + constructor(protected readonly _options: LipsyncVideoWithAnyText.Options = {}) {} + + /** + * @param {Gooey.LipsyncTtsPageRequest} request + * @param {LipsyncVideoWithAnyText.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.lipsyncVideoWithAnyText.lipsyncTts({ + * textPrompt: "text_prompt" + * }) + */ + public async lipsyncTts( + request: Gooey.LipsyncTtsPageRequest, + requestOptions?: LipsyncVideoWithAnyText.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/LipsyncTTS/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.LipsyncTtsPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.LipsyncTtsPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.LipsyncTtsPageRequest} request + * @param {LipsyncVideoWithAnyText.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.lipsyncVideoWithAnyText.asyncLipsyncTts({ + * textPrompt: "text_prompt" + * }) + */ + public async asyncLipsyncTts( + request: Gooey.LipsyncTtsPageRequest, + requestOptions?: LipsyncVideoWithAnyText.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/LipsyncTTS/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.LipsyncTtsPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusLipsyncTtsRequest} request + * @param {LipsyncVideoWithAnyText.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.lipsyncVideoWithAnyText.statusLipsyncTts({ + * runId: "run_id" + * }) + */ + public async statusLipsyncTts( + request: Gooey.StatusLipsyncTtsRequest, + requestOptions?: LipsyncVideoWithAnyText.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/LipsyncTTS/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.LipsyncTtsPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/lipsyncVideoWithAnyText/client/index.ts b/src/api/resources/lipsyncVideoWithAnyText/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/lipsyncVideoWithAnyText/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/lipsyncVideoWithAnyText/client/requests/StatusLipsyncTtsRequest.ts b/src/api/resources/lipsyncVideoWithAnyText/client/requests/StatusLipsyncTtsRequest.ts new file mode 100644 index 0000000..9765333 --- /dev/null +++ b/src/api/resources/lipsyncVideoWithAnyText/client/requests/StatusLipsyncTtsRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusLipsyncTtsRequest { + runId: string; +} diff --git a/src/api/resources/lipsyncVideoWithAnyText/client/requests/index.ts b/src/api/resources/lipsyncVideoWithAnyText/client/requests/index.ts new file mode 100644 index 0000000..76a4b21 --- /dev/null +++ b/src/api/resources/lipsyncVideoWithAnyText/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusLipsyncTtsRequest } from "./StatusLipsyncTtsRequest"; diff --git a/src/api/resources/lipsyncVideoWithAnyText/index.ts b/src/api/resources/lipsyncVideoWithAnyText/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/lipsyncVideoWithAnyText/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/misc/client/Client.ts b/src/api/resources/misc/client/Client.ts new file mode 100644 index 0000000..09c16e5 --- /dev/null +++ b/src/api/resources/misc/client/Client.ts @@ -0,0 +1,264 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import urlJoin from "url-join"; +import * as serializers from "../../../../serialization/index"; +import * as errors from "../../../../errors/index"; + +export declare namespace Misc { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class Misc { + constructor(protected readonly _options: Misc.Options = {}) {} + + /** + * @param {Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.UnprocessableEntityError} + * + * @example + * await client.misc.getBalance() + */ + public async getBalance(requestOptions?: Misc.RequestOptions): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v1/balance/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.BalanceResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.BotBroadcastRequestModel} request + * @param {Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.UnprocessableEntityError} + * + * @example + * await client.misc.videoBotsBroadcast({ + * text: "text" + * }) + */ + public async videoBotsBroadcast( + request: Gooey.BotBroadcastRequestModel, + requestOptions?: Misc.RequestOptions + ): Promise { + const { exampleId, runId, ..._body } = request; + const _queryParams: Record = {}; + if (exampleId != null) { + _queryParams["example_id"] = exampleId; + } + + if (runId != null) { + _queryParams["run_id"] = runId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/video-bots/broadcast/send/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.BotBroadcastRequestModel.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Misc.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.misc.health() + */ + public async health(requestOptions?: Misc.RequestOptions): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body; + } + + if (_response.error.reason === "status-code") { + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/misc/client/index.ts b/src/api/resources/misc/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/misc/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/misc/client/requests/BotBroadcastRequestModel.ts b/src/api/resources/misc/client/requests/BotBroadcastRequestModel.ts new file mode 100644 index 0000000..267b83e --- /dev/null +++ b/src/api/resources/misc/client/requests/BotBroadcastRequestModel.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../../../../index"; + +/** + * @example + * { + * text: "text" + * } + */ +export interface BotBroadcastRequestModel { + exampleId?: string; + runId?: string; + /** Message to broadcast to all users */ + text: string; + /** Audio URL to send to all users */ + audio?: string; + /** Video URL to send to all users */ + video?: string; + /** Video URL to send to all users */ + documents?: string[]; + /** Buttons to send to all users */ + buttons?: Gooey.ReplyButton[]; + /** Filters to select users to broadcast to. If not provided, will broadcast to all users of this bot. */ + filters?: Gooey.BotBroadcastFilters; +} diff --git a/src/api/resources/misc/client/requests/index.ts b/src/api/resources/misc/client/requests/index.ts new file mode 100644 index 0000000..24aff2a --- /dev/null +++ b/src/api/resources/misc/client/requests/index.ts @@ -0,0 +1 @@ +export { type BotBroadcastRequestModel } from "./BotBroadcastRequestModel"; diff --git a/src/api/resources/misc/index.ts b/src/api/resources/misc/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/misc/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/peopleAlsoAskAnswersFromADoc/client/Client.ts b/src/api/resources/peopleAlsoAskAnswersFromADoc/client/Client.ts new file mode 100644 index 0000000..fbd48e3 --- /dev/null +++ b/src/api/resources/peopleAlsoAskAnswersFromADoc/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace PeopleAlsoAskAnswersFromADoc { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class PeopleAlsoAskAnswersFromADoc { + constructor(protected readonly _options: PeopleAlsoAskAnswersFromADoc.Options = {}) {} + + /** + * @param {Gooey.RelatedQnADocPageRequest} request + * @param {PeopleAlsoAskAnswersFromADoc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.peopleAlsoAskAnswersFromADoc.relatedQnaMakerDoc({ + * searchQuery: "search_query" + * }) + */ + public async relatedQnaMakerDoc( + request: Gooey.RelatedQnADocPageRequest, + requestOptions?: PeopleAlsoAskAnswersFromADoc.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/related-qna-maker-doc/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.RelatedQnADocPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.RelatedQnADocPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.RelatedQnADocPageRequest} request + * @param {PeopleAlsoAskAnswersFromADoc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.peopleAlsoAskAnswersFromADoc.asyncRelatedQnaMakerDoc({ + * searchQuery: "search_query" + * }) + */ + public async asyncRelatedQnaMakerDoc( + request: Gooey.RelatedQnADocPageRequest, + requestOptions?: PeopleAlsoAskAnswersFromADoc.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/related-qna-maker-doc/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.RelatedQnADocPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusRelatedQnaMakerDocRequest} request + * @param {PeopleAlsoAskAnswersFromADoc.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.peopleAlsoAskAnswersFromADoc.statusRelatedQnaMakerDoc({ + * runId: "run_id" + * }) + */ + public async statusRelatedQnaMakerDoc( + request: Gooey.StatusRelatedQnaMakerDocRequest, + requestOptions?: PeopleAlsoAskAnswersFromADoc.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/related-qna-maker-doc/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.RelatedQnADocPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/peopleAlsoAskAnswersFromADoc/client/index.ts b/src/api/resources/peopleAlsoAskAnswersFromADoc/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/peopleAlsoAskAnswersFromADoc/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/peopleAlsoAskAnswersFromADoc/client/requests/StatusRelatedQnaMakerDocRequest.ts b/src/api/resources/peopleAlsoAskAnswersFromADoc/client/requests/StatusRelatedQnaMakerDocRequest.ts new file mode 100644 index 0000000..a23e62a --- /dev/null +++ b/src/api/resources/peopleAlsoAskAnswersFromADoc/client/requests/StatusRelatedQnaMakerDocRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusRelatedQnaMakerDocRequest { + runId: string; +} diff --git a/src/api/resources/peopleAlsoAskAnswersFromADoc/client/requests/index.ts b/src/api/resources/peopleAlsoAskAnswersFromADoc/client/requests/index.ts new file mode 100644 index 0000000..800f18b --- /dev/null +++ b/src/api/resources/peopleAlsoAskAnswersFromADoc/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusRelatedQnaMakerDocRequest } from "./StatusRelatedQnaMakerDocRequest"; diff --git a/src/api/resources/peopleAlsoAskAnswersFromADoc/index.ts b/src/api/resources/peopleAlsoAskAnswersFromADoc/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/peopleAlsoAskAnswersFromADoc/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/Client.ts b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/Client.ts new file mode 100644 index 0000000..95a41dc --- /dev/null +++ b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace ProfileLookupGpt3ForAiPersonalizedEmails { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class ProfileLookupGpt3ForAiPersonalizedEmails { + constructor(protected readonly _options: ProfileLookupGpt3ForAiPersonalizedEmails.Options = {}) {} + + /** + * @param {Gooey.SocialLookupEmailPageRequest} request + * @param {ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.profileLookupGpt3ForAiPersonalizedEmails.socialLookupEmail({ + * emailAddress: "email_address" + * }) + */ + public async socialLookupEmail( + request: Gooey.SocialLookupEmailPageRequest, + requestOptions?: ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/SocialLookupEmail/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.SocialLookupEmailPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.SocialLookupEmailPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.SocialLookupEmailPageRequest} request + * @param {ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.profileLookupGpt3ForAiPersonalizedEmails.asyncSocialLookupEmail({ + * emailAddress: "email_address" + * }) + */ + public async asyncSocialLookupEmail( + request: Gooey.SocialLookupEmailPageRequest, + requestOptions?: ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/SocialLookupEmail/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.SocialLookupEmailPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusSocialLookupEmailRequest} request + * @param {ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.profileLookupGpt3ForAiPersonalizedEmails.statusSocialLookupEmail({ + * runId: "run_id" + * }) + */ + public async statusSocialLookupEmail( + request: Gooey.StatusSocialLookupEmailRequest, + requestOptions?: ProfileLookupGpt3ForAiPersonalizedEmails.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/SocialLookupEmail/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.SocialLookupEmailPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/index.ts b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/requests/StatusSocialLookupEmailRequest.ts b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/requests/StatusSocialLookupEmailRequest.ts new file mode 100644 index 0000000..bfb431b --- /dev/null +++ b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/requests/StatusSocialLookupEmailRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusSocialLookupEmailRequest { + runId: string; +} diff --git a/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/requests/index.ts b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/requests/index.ts new file mode 100644 index 0000000..81d3cde --- /dev/null +++ b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusSocialLookupEmailRequest } from "./StatusSocialLookupEmailRequest"; diff --git a/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/index.ts b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/profileLookupGpt3ForAiPersonalizedEmails/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/renderImageSearchResultsWithAi/client/Client.ts b/src/api/resources/renderImageSearchResultsWithAi/client/Client.ts new file mode 100644 index 0000000..21efa70 --- /dev/null +++ b/src/api/resources/renderImageSearchResultsWithAi/client/Client.ts @@ -0,0 +1,355 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace RenderImageSearchResultsWithAi { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class RenderImageSearchResultsWithAi { + constructor(protected readonly _options: RenderImageSearchResultsWithAi.Options = {}) {} + + /** + * @param {Gooey.GoogleImageGenPageRequest} request + * @param {RenderImageSearchResultsWithAi.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.renderImageSearchResultsWithAi.googleImageGen({ + * searchQuery: "search_query", + * textPrompt: "text_prompt" + * }) + */ + public async googleImageGen( + request: Gooey.GoogleImageGenPageRequest, + requestOptions?: RenderImageSearchResultsWithAi.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/GoogleImageGen/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.GoogleImageGenPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.GoogleImageGenPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.GoogleImageGenPageRequest} request + * @param {RenderImageSearchResultsWithAi.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.renderImageSearchResultsWithAi.asyncGoogleImageGen({ + * searchQuery: "search_query", + * textPrompt: "text_prompt" + * }) + */ + public async asyncGoogleImageGen( + request: Gooey.GoogleImageGenPageRequest, + requestOptions?: RenderImageSearchResultsWithAi.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/GoogleImageGen/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.GoogleImageGenPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusGoogleImageGenRequest} request + * @param {RenderImageSearchResultsWithAi.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.renderImageSearchResultsWithAi.statusGoogleImageGen({ + * runId: "run_id" + * }) + */ + public async statusGoogleImageGen( + request: Gooey.StatusGoogleImageGenRequest, + requestOptions?: RenderImageSearchResultsWithAi.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/GoogleImageGen/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.GoogleImageGenPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/renderImageSearchResultsWithAi/client/index.ts b/src/api/resources/renderImageSearchResultsWithAi/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/renderImageSearchResultsWithAi/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/renderImageSearchResultsWithAi/client/requests/StatusGoogleImageGenRequest.ts b/src/api/resources/renderImageSearchResultsWithAi/client/requests/StatusGoogleImageGenRequest.ts new file mode 100644 index 0000000..2582d30 --- /dev/null +++ b/src/api/resources/renderImageSearchResultsWithAi/client/requests/StatusGoogleImageGenRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusGoogleImageGenRequest { + runId: string; +} diff --git a/src/api/resources/renderImageSearchResultsWithAi/client/requests/index.ts b/src/api/resources/renderImageSearchResultsWithAi/client/requests/index.ts new file mode 100644 index 0000000..c4f0f2a --- /dev/null +++ b/src/api/resources/renderImageSearchResultsWithAi/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusGoogleImageGenRequest } from "./StatusGoogleImageGenRequest"; diff --git a/src/api/resources/renderImageSearchResultsWithAi/index.ts b/src/api/resources/renderImageSearchResultsWithAi/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/renderImageSearchResultsWithAi/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/searchYourDocsWithGpt/client/Client.ts b/src/api/resources/searchYourDocsWithGpt/client/Client.ts new file mode 100644 index 0000000..1cf39a7 --- /dev/null +++ b/src/api/resources/searchYourDocsWithGpt/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace SearchYourDocsWithGpt { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class SearchYourDocsWithGpt { + constructor(protected readonly _options: SearchYourDocsWithGpt.Options = {}) {} + + /** + * @param {Gooey.DocSearchPageRequest} request + * @param {SearchYourDocsWithGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.searchYourDocsWithGpt.docSearch({ + * searchQuery: "search_query" + * }) + */ + public async docSearch( + request: Gooey.DocSearchPageRequest, + requestOptions?: SearchYourDocsWithGpt.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/doc-search/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.DocSearchPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.DocSearchPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.DocSearchPageRequest} request + * @param {SearchYourDocsWithGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.searchYourDocsWithGpt.asyncDocSearch({ + * searchQuery: "search_query" + * }) + */ + public async asyncDocSearch( + request: Gooey.DocSearchPageRequest, + requestOptions?: SearchYourDocsWithGpt.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/doc-search/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.DocSearchPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusDocSearchRequest} request + * @param {SearchYourDocsWithGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.searchYourDocsWithGpt.statusDocSearch({ + * runId: "run_id" + * }) + */ + public async statusDocSearch( + request: Gooey.StatusDocSearchRequest, + requestOptions?: SearchYourDocsWithGpt.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/doc-search/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.DocSearchPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/searchYourDocsWithGpt/client/index.ts b/src/api/resources/searchYourDocsWithGpt/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/searchYourDocsWithGpt/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/searchYourDocsWithGpt/client/requests/StatusDocSearchRequest.ts b/src/api/resources/searchYourDocsWithGpt/client/requests/StatusDocSearchRequest.ts new file mode 100644 index 0000000..85ef51b --- /dev/null +++ b/src/api/resources/searchYourDocsWithGpt/client/requests/StatusDocSearchRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusDocSearchRequest { + runId: string; +} diff --git a/src/api/resources/searchYourDocsWithGpt/client/requests/index.ts b/src/api/resources/searchYourDocsWithGpt/client/requests/index.ts new file mode 100644 index 0000000..433aaf6 --- /dev/null +++ b/src/api/resources/searchYourDocsWithGpt/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusDocSearchRequest } from "./StatusDocSearchRequest"; diff --git a/src/api/resources/searchYourDocsWithGpt/index.ts b/src/api/resources/searchYourDocsWithGpt/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/searchYourDocsWithGpt/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/smartGpt/client/Client.ts b/src/api/resources/smartGpt/client/Client.ts new file mode 100644 index 0000000..2be2963 --- /dev/null +++ b/src/api/resources/smartGpt/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace SmartGpt { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class SmartGpt { + constructor(protected readonly _options: SmartGpt.Options = {}) {} + + /** + * @param {Gooey.SmartGptPageRequest} request + * @param {SmartGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.smartGpt.post({ + * inputPrompt: "input_prompt" + * }) + */ + public async post( + request: Gooey.SmartGptPageRequest, + requestOptions?: SmartGpt.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/SmartGPT/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.SmartGptPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.SmartGptPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.SmartGptPageRequest} request + * @param {SmartGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.smartGpt.asyncSmartGpt({ + * inputPrompt: "input_prompt" + * }) + */ + public async asyncSmartGpt( + request: Gooey.SmartGptPageRequest, + requestOptions?: SmartGpt.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/SmartGPT/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.SmartGptPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusSmartGptRequest} request + * @param {SmartGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.smartGpt.statusSmartGpt({ + * runId: "run_id" + * }) + */ + public async statusSmartGpt( + request: Gooey.StatusSmartGptRequest, + requestOptions?: SmartGpt.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/SmartGPT/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.SmartGptPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/smartGpt/client/index.ts b/src/api/resources/smartGpt/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/smartGpt/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/smartGpt/client/requests/StatusSmartGptRequest.ts b/src/api/resources/smartGpt/client/requests/StatusSmartGptRequest.ts new file mode 100644 index 0000000..97168bd --- /dev/null +++ b/src/api/resources/smartGpt/client/requests/StatusSmartGptRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusSmartGptRequest { + runId: string; +} diff --git a/src/api/resources/smartGpt/client/requests/index.ts b/src/api/resources/smartGpt/client/requests/index.ts new file mode 100644 index 0000000..d6766fa --- /dev/null +++ b/src/api/resources/smartGpt/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusSmartGptRequest } from "./StatusSmartGptRequest"; diff --git a/src/api/resources/smartGpt/index.ts b/src/api/resources/smartGpt/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/smartGpt/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/speechRecognitionTranslation/client/Client.ts b/src/api/resources/speechRecognitionTranslation/client/Client.ts new file mode 100644 index 0000000..9023971 --- /dev/null +++ b/src/api/resources/speechRecognitionTranslation/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace SpeechRecognitionTranslation { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class SpeechRecognitionTranslation { + constructor(protected readonly _options: SpeechRecognitionTranslation.Options = {}) {} + + /** + * @param {Gooey.AsrPageRequest} request + * @param {SpeechRecognitionTranslation.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.speechRecognitionTranslation.asr({ + * documents: ["documents"] + * }) + */ + public async asr( + request: Gooey.AsrPageRequest, + requestOptions?: SpeechRecognitionTranslation.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/asr/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.AsrPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsrPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.AsrPageRequest} request + * @param {SpeechRecognitionTranslation.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.speechRecognitionTranslation.asyncAsr({ + * documents: ["documents"] + * }) + */ + public async asyncAsr( + request: Gooey.AsrPageRequest, + requestOptions?: SpeechRecognitionTranslation.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/asr/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.AsrPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusAsrRequest} request + * @param {SpeechRecognitionTranslation.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.speechRecognitionTranslation.statusAsr({ + * runId: "run_id" + * }) + */ + public async statusAsr( + request: Gooey.StatusAsrRequest, + requestOptions?: SpeechRecognitionTranslation.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/asr/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsrPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/speechRecognitionTranslation/client/index.ts b/src/api/resources/speechRecognitionTranslation/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/speechRecognitionTranslation/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/speechRecognitionTranslation/client/requests/StatusAsrRequest.ts b/src/api/resources/speechRecognitionTranslation/client/requests/StatusAsrRequest.ts new file mode 100644 index 0000000..dcff613 --- /dev/null +++ b/src/api/resources/speechRecognitionTranslation/client/requests/StatusAsrRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusAsrRequest { + runId: string; +} diff --git a/src/api/resources/speechRecognitionTranslation/client/requests/index.ts b/src/api/resources/speechRecognitionTranslation/client/requests/index.ts new file mode 100644 index 0000000..1445e2b --- /dev/null +++ b/src/api/resources/speechRecognitionTranslation/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusAsrRequest } from "./StatusAsrRequest"; diff --git a/src/api/resources/speechRecognitionTranslation/index.ts b/src/api/resources/speechRecognitionTranslation/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/speechRecognitionTranslation/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/summarizeYourDocsWithGpt/client/Client.ts b/src/api/resources/summarizeYourDocsWithGpt/client/Client.ts new file mode 100644 index 0000000..b0557b8 --- /dev/null +++ b/src/api/resources/summarizeYourDocsWithGpt/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace SummarizeYourDocsWithGpt { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class SummarizeYourDocsWithGpt { + constructor(protected readonly _options: SummarizeYourDocsWithGpt.Options = {}) {} + + /** + * @param {Gooey.DocSummaryPageRequest} request + * @param {SummarizeYourDocsWithGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.summarizeYourDocsWithGpt.docSummary({ + * documents: ["documents"] + * }) + */ + public async docSummary( + request: Gooey.DocSummaryPageRequest, + requestOptions?: SummarizeYourDocsWithGpt.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/doc-summary/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.DocSummaryPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.DocSummaryPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.DocSummaryPageRequest} request + * @param {SummarizeYourDocsWithGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.summarizeYourDocsWithGpt.asyncDocSummary({ + * documents: ["documents"] + * }) + */ + public async asyncDocSummary( + request: Gooey.DocSummaryPageRequest, + requestOptions?: SummarizeYourDocsWithGpt.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/doc-summary/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.DocSummaryPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusDocSummaryRequest} request + * @param {SummarizeYourDocsWithGpt.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.summarizeYourDocsWithGpt.statusDocSummary({ + * runId: "run_id" + * }) + */ + public async statusDocSummary( + request: Gooey.StatusDocSummaryRequest, + requestOptions?: SummarizeYourDocsWithGpt.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/doc-summary/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.DocSummaryPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/summarizeYourDocsWithGpt/client/index.ts b/src/api/resources/summarizeYourDocsWithGpt/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/summarizeYourDocsWithGpt/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/summarizeYourDocsWithGpt/client/requests/StatusDocSummaryRequest.ts b/src/api/resources/summarizeYourDocsWithGpt/client/requests/StatusDocSummaryRequest.ts new file mode 100644 index 0000000..a8ec8fd --- /dev/null +++ b/src/api/resources/summarizeYourDocsWithGpt/client/requests/StatusDocSummaryRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusDocSummaryRequest { + runId: string; +} diff --git a/src/api/resources/summarizeYourDocsWithGpt/client/requests/index.ts b/src/api/resources/summarizeYourDocsWithGpt/client/requests/index.ts new file mode 100644 index 0000000..6505946 --- /dev/null +++ b/src/api/resources/summarizeYourDocsWithGpt/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusDocSummaryRequest } from "./StatusDocSummaryRequest"; diff --git a/src/api/resources/summarizeYourDocsWithGpt/index.ts b/src/api/resources/summarizeYourDocsWithGpt/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/summarizeYourDocsWithGpt/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/syntheticDataMakerForVideosPdFs/client/Client.ts b/src/api/resources/syntheticDataMakerForVideosPdFs/client/Client.ts new file mode 100644 index 0000000..1dd7efd --- /dev/null +++ b/src/api/resources/syntheticDataMakerForVideosPdFs/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace SyntheticDataMakerForVideosPdFs { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class SyntheticDataMakerForVideosPdFs { + constructor(protected readonly _options: SyntheticDataMakerForVideosPdFs.Options = {}) {} + + /** + * @param {Gooey.DocExtractPageRequest} request + * @param {SyntheticDataMakerForVideosPdFs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.syntheticDataMakerForVideosPdFs.docExtract({ + * documents: ["documents"] + * }) + */ + public async docExtract( + request: Gooey.DocExtractPageRequest, + requestOptions?: SyntheticDataMakerForVideosPdFs.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/doc-extract/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.DocExtractPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.DocExtractPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.DocExtractPageRequest} request + * @param {SyntheticDataMakerForVideosPdFs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.syntheticDataMakerForVideosPdFs.asyncDocExtract({ + * documents: ["documents"] + * }) + */ + public async asyncDocExtract( + request: Gooey.DocExtractPageRequest, + requestOptions?: SyntheticDataMakerForVideosPdFs.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/doc-extract/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.DocExtractPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusDocExtractRequest} request + * @param {SyntheticDataMakerForVideosPdFs.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.syntheticDataMakerForVideosPdFs.statusDocExtract({ + * runId: "run_id" + * }) + */ + public async statusDocExtract( + request: Gooey.StatusDocExtractRequest, + requestOptions?: SyntheticDataMakerForVideosPdFs.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/doc-extract/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.DocExtractPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/syntheticDataMakerForVideosPdFs/client/index.ts b/src/api/resources/syntheticDataMakerForVideosPdFs/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/syntheticDataMakerForVideosPdFs/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/syntheticDataMakerForVideosPdFs/client/requests/StatusDocExtractRequest.ts b/src/api/resources/syntheticDataMakerForVideosPdFs/client/requests/StatusDocExtractRequest.ts new file mode 100644 index 0000000..bc296e6 --- /dev/null +++ b/src/api/resources/syntheticDataMakerForVideosPdFs/client/requests/StatusDocExtractRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusDocExtractRequest { + runId: string; +} diff --git a/src/api/resources/syntheticDataMakerForVideosPdFs/client/requests/index.ts b/src/api/resources/syntheticDataMakerForVideosPdFs/client/requests/index.ts new file mode 100644 index 0000000..5ad9d60 --- /dev/null +++ b/src/api/resources/syntheticDataMakerForVideosPdFs/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusDocExtractRequest } from "./StatusDocExtractRequest"; diff --git a/src/api/resources/syntheticDataMakerForVideosPdFs/index.ts b/src/api/resources/syntheticDataMakerForVideosPdFs/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/syntheticDataMakerForVideosPdFs/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/textGuidedAudioGenerator/client/Client.ts b/src/api/resources/textGuidedAudioGenerator/client/Client.ts new file mode 100644 index 0000000..4b12086 --- /dev/null +++ b/src/api/resources/textGuidedAudioGenerator/client/Client.ts @@ -0,0 +1,353 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace TextGuidedAudioGenerator { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class TextGuidedAudioGenerator { + constructor(protected readonly _options: TextGuidedAudioGenerator.Options = {}) {} + + /** + * @param {Gooey.Text2AudioPageRequest} request + * @param {TextGuidedAudioGenerator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.textGuidedAudioGenerator.text2Audio({ + * textPrompt: "text_prompt" + * }) + */ + public async text2Audio( + request: Gooey.Text2AudioPageRequest, + requestOptions?: TextGuidedAudioGenerator.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/text2audio/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.Text2AudioPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Text2AudioPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.Text2AudioPageRequest} request + * @param {TextGuidedAudioGenerator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.textGuidedAudioGenerator.asyncText2Audio({ + * textPrompt: "text_prompt" + * }) + */ + public async asyncText2Audio( + request: Gooey.Text2AudioPageRequest, + requestOptions?: TextGuidedAudioGenerator.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/text2audio/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.Text2AudioPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusText2AudioRequest} request + * @param {TextGuidedAudioGenerator.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.textGuidedAudioGenerator.statusText2Audio({ + * runId: "run_id" + * }) + */ + public async statusText2Audio( + request: Gooey.StatusText2AudioRequest, + requestOptions?: TextGuidedAudioGenerator.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/text2audio/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.Text2AudioPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/textGuidedAudioGenerator/client/index.ts b/src/api/resources/textGuidedAudioGenerator/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/textGuidedAudioGenerator/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/textGuidedAudioGenerator/client/requests/StatusText2AudioRequest.ts b/src/api/resources/textGuidedAudioGenerator/client/requests/StatusText2AudioRequest.ts new file mode 100644 index 0000000..71deda7 --- /dev/null +++ b/src/api/resources/textGuidedAudioGenerator/client/requests/StatusText2AudioRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusText2AudioRequest { + runId: string; +} diff --git a/src/api/resources/textGuidedAudioGenerator/client/requests/index.ts b/src/api/resources/textGuidedAudioGenerator/client/requests/index.ts new file mode 100644 index 0000000..305c67a --- /dev/null +++ b/src/api/resources/textGuidedAudioGenerator/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusText2AudioRequest } from "./StatusText2AudioRequest"; diff --git a/src/api/resources/textGuidedAudioGenerator/index.ts b/src/api/resources/textGuidedAudioGenerator/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/textGuidedAudioGenerator/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/webSearchGpt3/client/Client.ts b/src/api/resources/webSearchGpt3/client/Client.ts new file mode 100644 index 0000000..3a8b6ae --- /dev/null +++ b/src/api/resources/webSearchGpt3/client/Client.ts @@ -0,0 +1,355 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Gooey from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; + +export declare namespace WebSearchGpt3 { + interface Options { + environment?: core.Supplier; + apiKey?: core.Supplier; + /** Override the Authorization header */ + authorization?: core.Supplier; + fetcher?: core.FetchFunction; + } + + interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the Authorization header */ + authorization?: string | undefined; + } +} + +export class WebSearchGpt3 { + constructor(protected readonly _options: WebSearchGpt3.Options = {}) {} + + /** + * @param {Gooey.GoogleGptPageRequest} request + * @param {WebSearchGpt3.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * @throws {@link Gooey.InternalServerError} + * + * @example + * await client.webSearchGpt3.googleGpt({ + * searchQuery: "search_query", + * siteFilter: "site_filter" + * }) + */ + public async googleGpt( + request: Gooey.GoogleGptPageRequest, + requestOptions?: WebSearchGpt3.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v2/google-gpt/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.GoogleGptPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.GoogleGptPageResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 500: + throw new Gooey.InternalServerError( + serializers.FailedReponseModelV2.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.GoogleGptPageRequest} request + * @param {WebSearchGpt3.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.webSearchGpt3.asyncGoogleGpt({ + * searchQuery: "search_query", + * siteFilter: "site_filter" + * }) + */ + public async asyncGoogleGpt( + request: Gooey.GoogleGptPageRequest, + requestOptions?: WebSearchGpt3.RequestOptions + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/google-gpt/async/" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + requestType: "json", + body: serializers.GoogleGptPageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AsyncApiResponseModelV3.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {Gooey.StatusGoogleGptRequest} request + * @param {WebSearchGpt3.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.webSearchGpt3.statusGoogleGpt({ + * runId: "run_id" + * }) + */ + public async statusGoogleGpt( + request: Gooey.StatusGoogleGptRequest, + requestOptions?: WebSearchGpt3.RequestOptions + ): Promise { + const { runId } = request; + const _queryParams: Record = {}; + _queryParams["run_id"] = runId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/google-gpt/status/" + ), + method: "GET", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooey", + "X-Fern-SDK-Version": "0.0.1-beta0", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.GoogleGptPageStatusResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 402: + throw new Gooey.PaymentRequiredError(_response.error.body); + case 422: + throw new Gooey.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + case 429: + throw new Gooey.TooManyRequestsError( + serializers.GenericErrorResponse.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }) + ); + default: + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.GooeyError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.GooeyTimeoutError(); + case "unknown": + throw new errors.GooeyError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; + if (bearer == null) { + throw new errors.GooeyError({ + message: "Please specify GOOEY_API_KEY when instantiating the client.", + }); + } + + return `Bearer ${bearer}`; + } + + protected async _getCustomAuthorizationHeaders() { + const authorizationValue = await core.Supplier.get(this._options.authorization); + return { Authorization: authorizationValue }; + } +} diff --git a/src/api/resources/webSearchGpt3/client/index.ts b/src/api/resources/webSearchGpt3/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/api/resources/webSearchGpt3/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/webSearchGpt3/client/requests/StatusGoogleGptRequest.ts b/src/api/resources/webSearchGpt3/client/requests/StatusGoogleGptRequest.ts new file mode 100644 index 0000000..2c23a55 --- /dev/null +++ b/src/api/resources/webSearchGpt3/client/requests/StatusGoogleGptRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * runId: "run_id" + * } + */ +export interface StatusGoogleGptRequest { + runId: string; +} diff --git a/src/api/resources/webSearchGpt3/client/requests/index.ts b/src/api/resources/webSearchGpt3/client/requests/index.ts new file mode 100644 index 0000000..b815e41 --- /dev/null +++ b/src/api/resources/webSearchGpt3/client/requests/index.ts @@ -0,0 +1 @@ +export { type StatusGoogleGptRequest } from "./StatusGoogleGptRequest"; diff --git a/src/api/resources/webSearchGpt3/index.ts b/src/api/resources/webSearchGpt3/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/api/resources/webSearchGpt3/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/types/AggFunction.ts b/src/api/types/AggFunction.ts new file mode 100644 index 0000000..1941b94 --- /dev/null +++ b/src/api/types/AggFunction.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface AggFunction { + column?: string; + function: Gooey.Function; +} diff --git a/src/api/types/AggFunctionResult.ts b/src/api/types/AggFunctionResult.ts new file mode 100644 index 0000000..9e61b79 --- /dev/null +++ b/src/api/types/AggFunctionResult.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface AggFunctionResult { + column: string; + function: Gooey.Function; + count: number; + value: number; +} diff --git a/src/api/types/AnimationPrompt.ts b/src/api/types/AnimationPrompt.ts new file mode 100644 index 0000000..fd588f6 --- /dev/null +++ b/src/api/types/AnimationPrompt.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AnimationPrompt { + frame: string; + prompt: string; +} diff --git a/src/api/types/AsrChunk.ts b/src/api/types/AsrChunk.ts new file mode 100644 index 0000000..e655ff2 --- /dev/null +++ b/src/api/types/AsrChunk.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AsrChunk { + timestamp: unknown[]; + text: string; + speaker: number; +} diff --git a/src/api/types/AsrOutputJson.ts b/src/api/types/AsrOutputJson.ts new file mode 100644 index 0000000..7079058 --- /dev/null +++ b/src/api/types/AsrOutputJson.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface AsrOutputJson { + text: string; + chunks?: Gooey.AsrChunk[]; +} diff --git a/src/api/types/AsrPageOutput.ts b/src/api/types/AsrPageOutput.ts new file mode 100644 index 0000000..7c21fd4 --- /dev/null +++ b/src/api/types/AsrPageOutput.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface AsrPageOutput { + rawOutputText?: string[]; + outputText: Gooey.AsrPageOutputOutputTextItem[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/AsrPageOutputOutputTextItem.ts b/src/api/types/AsrPageOutputOutputTextItem.ts new file mode 100644 index 0000000..607f288 --- /dev/null +++ b/src/api/types/AsrPageOutputOutputTextItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export type AsrPageOutputOutputTextItem = string | Gooey.AsrOutputJson; diff --git a/src/api/types/AsrPageRequest.ts b/src/api/types/AsrPageRequest.ts new file mode 100644 index 0000000..cfdac8e --- /dev/null +++ b/src/api/types/AsrPageRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface AsrPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + documents: string[]; + selectedModel?: Gooey.AsrPageRequestSelectedModel; + language?: string; + translationModel?: Gooey.AsrPageRequestTranslationModel; + outputFormat?: Gooey.AsrPageRequestOutputFormat; + /** use `translation_model` & `translation_target` instead. */ + googleTranslateTarget?: string; + translationSource?: string; + translationTarget?: string; + /** + * Provide a glossary to customize translation and improve accuracy of domain-specific terms. + * If not specified or invalid, no glossary will be used. Read about the expected format [here](https://docs.google.com/document/d/1TwzAvFmFYekloRKql2PXNPIyqCbsHRL8ZtnWkzAYrh8/edit?usp=sharing). + */ + glossaryDocument?: string; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/AsrPageRequestOutputFormat.ts b/src/api/types/AsrPageRequestOutputFormat.ts new file mode 100644 index 0000000..fa713cf --- /dev/null +++ b/src/api/types/AsrPageRequestOutputFormat.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type AsrPageRequestOutputFormat = "text" | "json" | "srt" | "vtt"; + +export const AsrPageRequestOutputFormat = { + Text: "text", + Json: "json", + Srt: "srt", + Vtt: "vtt", +} as const; diff --git a/src/api/types/AsrPageRequestSelectedModel.ts b/src/api/types/AsrPageRequestSelectedModel.ts new file mode 100644 index 0000000..9ce90c7 --- /dev/null +++ b/src/api/types/AsrPageRequestSelectedModel.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type AsrPageRequestSelectedModel = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; + +export const AsrPageRequestSelectedModel = { + WhisperLargeV2: "whisper_large_v2", + WhisperLargeV3: "whisper_large_v3", + WhisperHindiLargeV2: "whisper_hindi_large_v2", + WhisperTeluguLargeV2: "whisper_telugu_large_v2", + NemoEnglish: "nemo_english", + NemoHindi: "nemo_hindi", + VakyanshBhojpuri: "vakyansh_bhojpuri", + GcpV1: "gcp_v1", + Usm: "usm", + Deepgram: "deepgram", + Azure: "azure", + SeamlessM4T: "seamless_m4t", + Mms1BAll: "mms_1b_all", +} as const; diff --git a/src/api/types/AsrPageRequestTranslationModel.ts b/src/api/types/AsrPageRequestTranslationModel.ts new file mode 100644 index 0000000..0bdb923 --- /dev/null +++ b/src/api/types/AsrPageRequestTranslationModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type AsrPageRequestTranslationModel = "google" | "ghana_nlp"; + +export const AsrPageRequestTranslationModel = { + Google: "google", + GhanaNlp: "ghana_nlp", +} as const; diff --git a/src/api/types/AsrPageResponse.ts b/src/api/types/AsrPageResponse.ts new file mode 100644 index 0000000..4d52193 --- /dev/null +++ b/src/api/types/AsrPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface AsrPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.AsrPageOutput; +} diff --git a/src/api/types/AsrPageStatusResponse.ts b/src/api/types/AsrPageStatusResponse.ts new file mode 100644 index 0000000..ba9f41c --- /dev/null +++ b/src/api/types/AsrPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface AsrPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.AsrPageOutput; +} diff --git a/src/api/types/AsyncApiResponseModelV3.ts b/src/api/types/AsyncApiResponseModelV3.ts new file mode 100644 index 0000000..47f751b --- /dev/null +++ b/src/api/types/AsyncApiResponseModelV3.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AsyncApiResponseModelV3 { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** URL to check the status of the run. Also included in the `Location` header of the response. */ + statusUrl: string; +} diff --git a/src/api/types/BalanceResponse.ts b/src/api/types/BalanceResponse.ts new file mode 100644 index 0000000..02672b8 --- /dev/null +++ b/src/api/types/BalanceResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface BalanceResponse { + /** Current balance in credits */ + balance: number; +} diff --git a/src/api/types/BotBroadcastFilters.ts b/src/api/types/BotBroadcastFilters.ts new file mode 100644 index 0000000..648a99f --- /dev/null +++ b/src/api/types/BotBroadcastFilters.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface BotBroadcastFilters { + /** A list of WhatsApp phone numbers to broadcast to. */ + waPhoneNumberIn?: string[]; + /** A list of Slack user IDs to broadcast to. */ + slackUserIdIn?: string[]; + /** Filter by the Slack user's name. Case insensitive. */ + slackUserNameIcontains?: string; + /** Filter by whether the Slack channel is personal. By default, will broadcast to both public and personal slack channels. */ + slackChannelIsPersonal?: boolean; +} diff --git a/src/api/types/BulkEvalPageOutput.ts b/src/api/types/BulkEvalPageOutput.ts new file mode 100644 index 0000000..bd4e7d8 --- /dev/null +++ b/src/api/types/BulkEvalPageOutput.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface BulkEvalPageOutput { + outputDocuments: string[]; + finalPrompts?: string[][]; + aggregations?: Gooey.AggFunctionResult[][]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/BulkEvalPageRequest.ts b/src/api/types/BulkEvalPageRequest.ts new file mode 100644 index 0000000..40fe048 --- /dev/null +++ b/src/api/types/BulkEvalPageRequest.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface BulkEvalPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + selectedModel?: Gooey.BulkEvalPageRequestSelectedModel; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + /** + * Upload or link to a CSV or google sheet that contains your sample input data. + * For example, for Copilot, this would sample questions or for Art QR Code, would would be pairs of image descriptions and URLs. + * Remember to includes header names in your CSV too. + */ + documents: string[]; + /** + * Specify custom LLM prompts to calculate metrics that evaluate each row of the input data. The output should be a JSON object mapping the metric names to values. + * _The `columns` dictionary can be used to reference the spreadsheet columns._ + * + */ + evalPrompts?: Gooey.EvalPrompt[]; + /** Aggregate using one or more operations. Uses [pandas](https://pandas.pydata.org/pandas-docs/stable/reference/groupby.html#dataframegroupby-computations-descriptive-stats). */ + aggFunctions?: Gooey.AggFunction[]; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/BulkEvalPageRequestSelectedModel.ts b/src/api/types/BulkEvalPageRequestSelectedModel.ts new file mode 100644 index 0000000..751f42b --- /dev/null +++ b/src/api/types/BulkEvalPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type BulkEvalPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const BulkEvalPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/BulkEvalPageResponse.ts b/src/api/types/BulkEvalPageResponse.ts new file mode 100644 index 0000000..b1879a4 --- /dev/null +++ b/src/api/types/BulkEvalPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface BulkEvalPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.BulkEvalPageOutput; +} diff --git a/src/api/types/BulkEvalPageStatusResponse.ts b/src/api/types/BulkEvalPageStatusResponse.ts new file mode 100644 index 0000000..c575d9a --- /dev/null +++ b/src/api/types/BulkEvalPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface BulkEvalPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.BulkEvalPageOutput; +} diff --git a/src/api/types/BulkRunnerPageOutput.ts b/src/api/types/BulkRunnerPageOutput.ts new file mode 100644 index 0000000..71669c5 --- /dev/null +++ b/src/api/types/BulkRunnerPageOutput.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface BulkRunnerPageOutput { + outputDocuments: string[]; + /** List of URLs to the evaluation runs that you requested. */ + evalRuns?: string[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/BulkRunnerPageRequest.ts b/src/api/types/BulkRunnerPageRequest.ts new file mode 100644 index 0000000..33da25b --- /dev/null +++ b/src/api/types/BulkRunnerPageRequest.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface BulkRunnerPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + /** + * Upload or link to a CSV or google sheet that contains your sample input data. + * For example, for Copilot, this would sample questions or for Art QR Code, would would be pairs of image descriptions and URLs. + * Remember to includes header names in your CSV too. + */ + documents: string[]; + /** + * Provide one or more Gooey.AI workflow runs. + * You can add multiple runs from the same recipe (e.g. two versions of your copilot) and we'll run the inputs over both of them. + */ + runUrls: string[]; + /** For each input field in the Gooey.AI workflow, specify the column in your input data that corresponds to it. */ + inputColumns: Record; + /** For each output field in the Gooey.AI workflow, specify the column name that you'd like to use for it in the output data. */ + outputColumns: Record; + /** _(optional)_ Add one or more Gooey.AI Evaluator Workflows to evaluate the results of your runs. */ + evalUrls?: string[]; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/BulkRunnerPageResponse.ts b/src/api/types/BulkRunnerPageResponse.ts new file mode 100644 index 0000000..6aeff98 --- /dev/null +++ b/src/api/types/BulkRunnerPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface BulkRunnerPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.BulkRunnerPageOutput; +} diff --git a/src/api/types/BulkRunnerPageStatusResponse.ts b/src/api/types/BulkRunnerPageStatusResponse.ts new file mode 100644 index 0000000..fe26747 --- /dev/null +++ b/src/api/types/BulkRunnerPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface BulkRunnerPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.BulkRunnerPageOutput; +} diff --git a/src/api/types/ButtonPressed.ts b/src/api/types/ButtonPressed.ts new file mode 100644 index 0000000..09e089b --- /dev/null +++ b/src/api/types/ButtonPressed.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ButtonPressed { + /** The ID of the button that was pressed by the user */ + buttonId: string; + /** The message ID of the context message on which the button was pressed */ + contextMsgId: string; +} diff --git a/src/api/types/CalledFunctionResponse.ts b/src/api/types/CalledFunctionResponse.ts new file mode 100644 index 0000000..bc04943 --- /dev/null +++ b/src/api/types/CalledFunctionResponse.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CalledFunctionResponse { + url: string; + trigger: Gooey.Trigger; + returnValue?: unknown; +} diff --git a/src/api/types/ChatCompletionContentPartImageParam.ts b/src/api/types/ChatCompletionContentPartImageParam.ts new file mode 100644 index 0000000..41014ac --- /dev/null +++ b/src/api/types/ChatCompletionContentPartImageParam.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ChatCompletionContentPartImageParam { + imageUrl?: Gooey.ImageUrl; +} diff --git a/src/api/types/ChatCompletionContentPartTextParam.ts b/src/api/types/ChatCompletionContentPartTextParam.ts new file mode 100644 index 0000000..93ab79c --- /dev/null +++ b/src/api/types/ChatCompletionContentPartTextParam.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ChatCompletionContentPartTextParam { + text?: string; +} diff --git a/src/api/types/ChyronPlantPageOutput.ts b/src/api/types/ChyronPlantPageOutput.ts new file mode 100644 index 0000000..b639ab4 --- /dev/null +++ b/src/api/types/ChyronPlantPageOutput.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ChyronPlantPageOutput { + midiTranslation: string; + chyronOutput: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/ChyronPlantPageRequest.ts b/src/api/types/ChyronPlantPageRequest.ts new file mode 100644 index 0000000..4b6ba0d --- /dev/null +++ b/src/api/types/ChyronPlantPageRequest.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ChyronPlantPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + midiNotes: string; + midiNotesPrompt?: string; + chyronPrompt?: string; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/ChyronPlantPageResponse.ts b/src/api/types/ChyronPlantPageResponse.ts new file mode 100644 index 0000000..6abec0e --- /dev/null +++ b/src/api/types/ChyronPlantPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ChyronPlantPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.ChyronPlantPageOutput; +} diff --git a/src/api/types/ChyronPlantPageStatusResponse.ts b/src/api/types/ChyronPlantPageStatusResponse.ts new file mode 100644 index 0000000..5f0894b --- /dev/null +++ b/src/api/types/ChyronPlantPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ChyronPlantPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.ChyronPlantPageOutput; +} diff --git a/src/api/types/CompareLlmPageOutput.ts b/src/api/types/CompareLlmPageOutput.ts new file mode 100644 index 0000000..6b7e44f --- /dev/null +++ b/src/api/types/CompareLlmPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareLlmPageOutput { + outputText: Record; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/CompareLlmPageRequest.ts b/src/api/types/CompareLlmPageRequest.ts new file mode 100644 index 0000000..524ac8a --- /dev/null +++ b/src/api/types/CompareLlmPageRequest.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareLlmPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputPrompt?: string; + selectedModels?: Gooey.CompareLlmPageRequestSelectedModelsItem[]; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + responseFormatType?: Gooey.CompareLlmPageRequestResponseFormatType; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/CompareLlmPageRequestResponseFormatType.ts b/src/api/types/CompareLlmPageRequestResponseFormatType.ts new file mode 100644 index 0000000..194a91d --- /dev/null +++ b/src/api/types/CompareLlmPageRequestResponseFormatType.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CompareLlmPageRequestResponseFormatType = "text" | "json_object"; + +export const CompareLlmPageRequestResponseFormatType = { + Text: "text", + JsonObject: "json_object", +} as const; diff --git a/src/api/types/CompareLlmPageRequestSelectedModelsItem.ts b/src/api/types/CompareLlmPageRequestSelectedModelsItem.ts new file mode 100644 index 0000000..00d4f96 --- /dev/null +++ b/src/api/types/CompareLlmPageRequestSelectedModelsItem.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CompareLlmPageRequestSelectedModelsItem = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const CompareLlmPageRequestSelectedModelsItem = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/CompareLlmPageResponse.ts b/src/api/types/CompareLlmPageResponse.ts new file mode 100644 index 0000000..a4ead91 --- /dev/null +++ b/src/api/types/CompareLlmPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareLlmPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.CompareLlmPageOutput; +} diff --git a/src/api/types/CompareLlmPageStatusResponse.ts b/src/api/types/CompareLlmPageStatusResponse.ts new file mode 100644 index 0000000..c1d5725 --- /dev/null +++ b/src/api/types/CompareLlmPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareLlmPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.CompareLlmPageOutput; +} diff --git a/src/api/types/CompareText2ImgPageOutput.ts b/src/api/types/CompareText2ImgPageOutput.ts new file mode 100644 index 0000000..4e8703d --- /dev/null +++ b/src/api/types/CompareText2ImgPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareText2ImgPageOutput { + outputImages: Record; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/CompareText2ImgPageRequest.ts b/src/api/types/CompareText2ImgPageRequest.ts new file mode 100644 index 0000000..1286ece --- /dev/null +++ b/src/api/types/CompareText2ImgPageRequest.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareText2ImgPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + textPrompt: string; + negativePrompt?: string; + outputWidth?: number; + outputHeight?: number; + numOutputs?: number; + quality?: number; + dallE3Quality?: string; + dallE3Style?: string; + guidanceScale?: number; + seed?: number; + sd2Upscaling?: boolean; + selectedModels?: Gooey.CompareText2ImgPageRequestSelectedModelsItem[]; + scheduler?: Gooey.Scheduler; + editInstruction?: string; + imageGuidanceScale?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/CompareText2ImgPageRequestSelectedModelsItem.ts b/src/api/types/CompareText2ImgPageRequestSelectedModelsItem.ts new file mode 100644 index 0000000..dc5fe7a --- /dev/null +++ b/src/api/types/CompareText2ImgPageRequestSelectedModelsItem.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CompareText2ImgPageRequestSelectedModelsItem = + | "dream_shaper" + | "dreamlike_2" + | "sd_2" + | "sd_1_5" + | "dall_e" + | "dall_e_3" + | "openjourney_2" + | "openjourney" + | "analog_diffusion" + | "protogen_5_3" + | "jack_qiao" + | "rodent_diffusion_1_5" + | "deepfloyd_if"; + +export const CompareText2ImgPageRequestSelectedModelsItem = { + DreamShaper: "dream_shaper", + Dreamlike2: "dreamlike_2", + Sd2: "sd_2", + Sd15: "sd_1_5", + DallE: "dall_e", + DallE3: "dall_e_3", + Openjourney2: "openjourney_2", + Openjourney: "openjourney", + AnalogDiffusion: "analog_diffusion", + Protogen53: "protogen_5_3", + JackQiao: "jack_qiao", + RodentDiffusion15: "rodent_diffusion_1_5", + DeepfloydIf: "deepfloyd_if", +} as const; diff --git a/src/api/types/CompareText2ImgPageResponse.ts b/src/api/types/CompareText2ImgPageResponse.ts new file mode 100644 index 0000000..32e1db8 --- /dev/null +++ b/src/api/types/CompareText2ImgPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareText2ImgPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.CompareText2ImgPageOutput; +} diff --git a/src/api/types/CompareText2ImgPageStatusResponse.ts b/src/api/types/CompareText2ImgPageStatusResponse.ts new file mode 100644 index 0000000..c492009 --- /dev/null +++ b/src/api/types/CompareText2ImgPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareText2ImgPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.CompareText2ImgPageOutput; +} diff --git a/src/api/types/CompareUpscalerPageOutput.ts b/src/api/types/CompareUpscalerPageOutput.ts new file mode 100644 index 0000000..c0027de --- /dev/null +++ b/src/api/types/CompareUpscalerPageOutput.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareUpscalerPageOutput { + /** Output Images */ + outputImages?: Record; + /** Output Videos */ + outputVideos?: Record; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/CompareUpscalerPageRequest.ts b/src/api/types/CompareUpscalerPageRequest.ts new file mode 100644 index 0000000..0102421 --- /dev/null +++ b/src/api/types/CompareUpscalerPageRequest.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareUpscalerPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + /** Input Image */ + inputImage?: string; + /** Input Video */ + inputVideo?: string; + /** The final upsampling scale of the image */ + scale: number; + selectedModels?: Gooey.CompareUpscalerPageRequestSelectedModelsItem[]; + selectedBgModel?: "real_esrgan_x2"; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/CompareUpscalerPageRequestSelectedModelsItem.ts b/src/api/types/CompareUpscalerPageRequestSelectedModelsItem.ts new file mode 100644 index 0000000..719cdde --- /dev/null +++ b/src/api/types/CompareUpscalerPageRequestSelectedModelsItem.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type CompareUpscalerPageRequestSelectedModelsItem = + | "gfpgan_1_4" + | "real_esrgan_x2" + | "sd_x4" + | "real_esrgan" + | "gfpgan"; + +export const CompareUpscalerPageRequestSelectedModelsItem = { + Gfpgan14: "gfpgan_1_4", + RealEsrganX2: "real_esrgan_x2", + SdX4: "sd_x4", + RealEsrgan: "real_esrgan", + Gfpgan: "gfpgan", +} as const; diff --git a/src/api/types/CompareUpscalerPageResponse.ts b/src/api/types/CompareUpscalerPageResponse.ts new file mode 100644 index 0000000..0c16a0c --- /dev/null +++ b/src/api/types/CompareUpscalerPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareUpscalerPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.CompareUpscalerPageOutput; +} diff --git a/src/api/types/CompareUpscalerPageStatusResponse.ts b/src/api/types/CompareUpscalerPageStatusResponse.ts new file mode 100644 index 0000000..34461d4 --- /dev/null +++ b/src/api/types/CompareUpscalerPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface CompareUpscalerPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.CompareUpscalerPageOutput; +} diff --git a/src/api/types/ConsoleLogs.ts b/src/api/types/ConsoleLogs.ts new file mode 100644 index 0000000..ae9b7d5 --- /dev/null +++ b/src/api/types/ConsoleLogs.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ConsoleLogs { + level: Gooey.Level; + message: string; +} diff --git a/src/api/types/Content.ts b/src/api/types/Content.ts new file mode 100644 index 0000000..31b6e7a --- /dev/null +++ b/src/api/types/Content.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export type Content = string | Gooey.ConversationEntryContentItem[]; diff --git a/src/api/types/ConversationEntry.ts b/src/api/types/ConversationEntry.ts new file mode 100644 index 0000000..75db917 --- /dev/null +++ b/src/api/types/ConversationEntry.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ConversationEntry { + role: Gooey.Role; + content: Gooey.Content; + displayName?: string; +} diff --git a/src/api/types/ConversationEntryContentItem.ts b/src/api/types/ConversationEntryContentItem.ts new file mode 100644 index 0000000..5feb598 --- /dev/null +++ b/src/api/types/ConversationEntryContentItem.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export type ConversationEntryContentItem = + | Gooey.ConversationEntryContentItem.Text + | Gooey.ConversationEntryContentItem.ImageUrl; + +export declare namespace ConversationEntryContentItem { + interface Text extends Gooey.ChatCompletionContentPartTextParam { + type: "text"; + } + + interface ImageUrl extends Gooey.ChatCompletionContentPartImageParam { + type: "image_url"; + } +} diff --git a/src/api/types/ConversationStart.ts b/src/api/types/ConversationStart.ts new file mode 100644 index 0000000..1b19034 --- /dev/null +++ b/src/api/types/ConversationStart.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ConversationStart { + /** The conversation ID you provided in the request, or a random ID if not provided */ + conversationId: string; + /** The user ID associated with this conversation */ + userId: string; + /** The user message ID you provided in the request, or a random ID if not provided. */ + userMessageId: string; + /** The bot message ID. Use this ID as the `context_msg_id` when sending a `button_pressed`. */ + botMessageId: string; + /** Time when the conversation was created as ISO format */ + createdAt: string; + /** The conversation was started. Save the IDs for future requests. */ + type?: string; +} diff --git a/src/api/types/CreateStreamResponse.ts b/src/api/types/CreateStreamResponse.ts new file mode 100644 index 0000000..9db3e55 --- /dev/null +++ b/src/api/types/CreateStreamResponse.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CreateStreamResponse { + /** The URL to stream the conversation. Use Server-Sent Events (SSE) to stream the response. */ + streamUrl: string; +} diff --git a/src/api/types/DeforumSdPageOutput.ts b/src/api/types/DeforumSdPageOutput.ts new file mode 100644 index 0000000..3a77432 --- /dev/null +++ b/src/api/types/DeforumSdPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DeforumSdPageOutput { + outputVideo: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/DeforumSdPageRequest.ts b/src/api/types/DeforumSdPageRequest.ts new file mode 100644 index 0000000..1be0f47 --- /dev/null +++ b/src/api/types/DeforumSdPageRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DeforumSdPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + animationPrompts: Gooey.AnimationPrompt[]; + maxFrames?: number; + selectedModel?: Gooey.DeforumSdPageRequestSelectedModel; + animationMode?: string; + zoom?: string; + translationX?: string; + translationY?: string; + rotation3DX?: string; + rotation3DY?: string; + rotation3DZ?: string; + fps?: number; + seed?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/DeforumSdPageRequestSelectedModel.ts b/src/api/types/DeforumSdPageRequestSelectedModel.ts new file mode 100644 index 0000000..741bfe7 --- /dev/null +++ b/src/api/types/DeforumSdPageRequestSelectedModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DeforumSdPageRequestSelectedModel = "protogen_2_2" | "epicdream"; + +export const DeforumSdPageRequestSelectedModel = { + Protogen22: "protogen_2_2", + Epicdream: "epicdream", +} as const; diff --git a/src/api/types/DeforumSdPageResponse.ts b/src/api/types/DeforumSdPageResponse.ts new file mode 100644 index 0000000..977f7f4 --- /dev/null +++ b/src/api/types/DeforumSdPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DeforumSdPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.DeforumSdPageOutput; +} diff --git a/src/api/types/DeforumSdPageStatusResponse.ts b/src/api/types/DeforumSdPageStatusResponse.ts new file mode 100644 index 0000000..ec00730 --- /dev/null +++ b/src/api/types/DeforumSdPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DeforumSdPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.DeforumSdPageOutput; +} diff --git a/src/api/types/Detail.ts b/src/api/types/Detail.ts new file mode 100644 index 0000000..16e3442 --- /dev/null +++ b/src/api/types/Detail.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Detail = "auto" | "low" | "high"; + +export const Detail = { + Auto: "auto", + Low: "low", + High: "high", +} as const; diff --git a/src/api/types/DocExtractPageOutput.ts b/src/api/types/DocExtractPageOutput.ts new file mode 100644 index 0000000..5d0813e --- /dev/null +++ b/src/api/types/DocExtractPageOutput.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocExtractPageOutput { + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/DocExtractPageRequest.ts b/src/api/types/DocExtractPageRequest.ts new file mode 100644 index 0000000..c5a1e62 --- /dev/null +++ b/src/api/types/DocExtractPageRequest.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocExtractPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + documents: string[]; + sheetUrl?: string; + selectedAsrModel?: Gooey.DocExtractPageRequestSelectedAsrModel; + googleTranslateTarget?: string; + /** + * Provide a glossary to customize translation and improve accuracy of domain-specific terms. + * If not specified or invalid, no glossary will be used. Read about the expected format [here](https://docs.google.com/document/d/1TwzAvFmFYekloRKql2PXNPIyqCbsHRL8ZtnWkzAYrh8/edit?usp=sharing). + */ + glossaryDocument?: string; + taskInstructions?: string; + selectedModel?: Gooey.DocExtractPageRequestSelectedModel; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/DocExtractPageRequestSelectedAsrModel.ts b/src/api/types/DocExtractPageRequestSelectedAsrModel.ts new file mode 100644 index 0000000..2785a36 --- /dev/null +++ b/src/api/types/DocExtractPageRequestSelectedAsrModel.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DocExtractPageRequestSelectedAsrModel = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; + +export const DocExtractPageRequestSelectedAsrModel = { + WhisperLargeV2: "whisper_large_v2", + WhisperLargeV3: "whisper_large_v3", + WhisperHindiLargeV2: "whisper_hindi_large_v2", + WhisperTeluguLargeV2: "whisper_telugu_large_v2", + NemoEnglish: "nemo_english", + NemoHindi: "nemo_hindi", + VakyanshBhojpuri: "vakyansh_bhojpuri", + GcpV1: "gcp_v1", + Usm: "usm", + Deepgram: "deepgram", + Azure: "azure", + SeamlessM4T: "seamless_m4t", + Mms1BAll: "mms_1b_all", +} as const; diff --git a/src/api/types/DocExtractPageRequestSelectedModel.ts b/src/api/types/DocExtractPageRequestSelectedModel.ts new file mode 100644 index 0000000..06cd5a9 --- /dev/null +++ b/src/api/types/DocExtractPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DocExtractPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const DocExtractPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/DocExtractPageResponse.ts b/src/api/types/DocExtractPageResponse.ts new file mode 100644 index 0000000..4fdf606 --- /dev/null +++ b/src/api/types/DocExtractPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocExtractPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.DocExtractPageOutput; +} diff --git a/src/api/types/DocExtractPageStatusResponse.ts b/src/api/types/DocExtractPageStatusResponse.ts new file mode 100644 index 0000000..2b77c65 --- /dev/null +++ b/src/api/types/DocExtractPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocExtractPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.DocExtractPageOutput; +} diff --git a/src/api/types/DocSearchPageOutput.ts b/src/api/types/DocSearchPageOutput.ts new file mode 100644 index 0000000..0c721f8 --- /dev/null +++ b/src/api/types/DocSearchPageOutput.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocSearchPageOutput { + outputText: string[]; + references: Gooey.SearchReference[]; + finalPrompt: string; + finalSearchQuery?: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/DocSearchPageRequest.ts b/src/api/types/DocSearchPageRequest.ts new file mode 100644 index 0000000..0bac0a6 --- /dev/null +++ b/src/api/types/DocSearchPageRequest.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocSearchPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + searchQuery: string; + keywordQuery?: Gooey.DocSearchPageRequestKeywordQuery; + documents?: string[]; + maxReferences?: number; + maxContextWords?: number; + scrollJump?: number; + docExtractUrl?: string; + embeddingModel?: Gooey.DocSearchPageRequestEmbeddingModel; + /** + * Weightage for dense vs sparse embeddings. `0` for sparse, `1` for dense, `0.5` for equal weight. + * Generally speaking, dense embeddings excel at understanding the context of the query, whereas sparse vectors excel at keyword matches. + */ + denseWeight?: number; + taskInstructions?: string; + queryInstructions?: string; + selectedModel?: Gooey.DocSearchPageRequestSelectedModel; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + citationStyle?: Gooey.DocSearchPageRequestCitationStyle; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/DocSearchPageRequestCitationStyle.ts b/src/api/types/DocSearchPageRequestCitationStyle.ts new file mode 100644 index 0000000..50305e7 --- /dev/null +++ b/src/api/types/DocSearchPageRequestCitationStyle.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DocSearchPageRequestCitationStyle = + | "number" + | "title" + | "url" + | "symbol" + | "markdown" + | "html" + | "slack_mrkdwn" + | "plaintext" + | "number_markdown" + | "number_html" + | "number_slack_mrkdwn" + | "number_plaintext" + | "symbol_markdown" + | "symbol_html" + | "symbol_slack_mrkdwn" + | "symbol_plaintext"; + +export const DocSearchPageRequestCitationStyle = { + Number: "number", + Title: "title", + Url: "url", + Symbol: "symbol", + Markdown: "markdown", + Html: "html", + SlackMrkdwn: "slack_mrkdwn", + Plaintext: "plaintext", + NumberMarkdown: "number_markdown", + NumberHtml: "number_html", + NumberSlackMrkdwn: "number_slack_mrkdwn", + NumberPlaintext: "number_plaintext", + SymbolMarkdown: "symbol_markdown", + SymbolHtml: "symbol_html", + SymbolSlackMrkdwn: "symbol_slack_mrkdwn", + SymbolPlaintext: "symbol_plaintext", +} as const; diff --git a/src/api/types/DocSearchPageRequestEmbeddingModel.ts b/src/api/types/DocSearchPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..0313fbf --- /dev/null +++ b/src/api/types/DocSearchPageRequestEmbeddingModel.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DocSearchPageRequestEmbeddingModel = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; + +export const DocSearchPageRequestEmbeddingModel = { + Openai3Large: "openai_3_large", + Openai3Small: "openai_3_small", + OpenaiAda2: "openai_ada_2", + E5LargeV2: "e5_large_v2", + E5BaseV2: "e5_base_v2", + MultilingualE5Base: "multilingual_e5_base", + MultilingualE5Large: "multilingual_e5_large", + GteLarge: "gte_large", + GteBase: "gte_base", +} as const; diff --git a/src/api/types/DocSearchPageRequestKeywordQuery.ts b/src/api/types/DocSearchPageRequestKeywordQuery.ts new file mode 100644 index 0000000..bd68c37 --- /dev/null +++ b/src/api/types/DocSearchPageRequestKeywordQuery.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DocSearchPageRequestKeywordQuery = string | string[]; diff --git a/src/api/types/DocSearchPageRequestSelectedModel.ts b/src/api/types/DocSearchPageRequestSelectedModel.ts new file mode 100644 index 0000000..6d85a37 --- /dev/null +++ b/src/api/types/DocSearchPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DocSearchPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const DocSearchPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/DocSearchPageResponse.ts b/src/api/types/DocSearchPageResponse.ts new file mode 100644 index 0000000..b54419d --- /dev/null +++ b/src/api/types/DocSearchPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocSearchPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.DocSearchPageOutput; +} diff --git a/src/api/types/DocSearchPageStatusResponse.ts b/src/api/types/DocSearchPageStatusResponse.ts new file mode 100644 index 0000000..fcae289 --- /dev/null +++ b/src/api/types/DocSearchPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocSearchPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.DocSearchPageOutput; +} diff --git a/src/api/types/DocSummaryPageOutput.ts b/src/api/types/DocSummaryPageOutput.ts new file mode 100644 index 0000000..eb5bdfc --- /dev/null +++ b/src/api/types/DocSummaryPageOutput.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocSummaryPageOutput { + outputText: string[]; + promptTree?: Gooey.PromptTreeNode[]; + finalPrompt: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/DocSummaryPageRequest.ts b/src/api/types/DocSummaryPageRequest.ts new file mode 100644 index 0000000..f6b004f --- /dev/null +++ b/src/api/types/DocSummaryPageRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocSummaryPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + documents: string[]; + taskInstructions?: string; + mergeInstructions?: string; + selectedModel?: Gooey.DocSummaryPageRequestSelectedModel; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + chainType?: "map_reduce"; + selectedAsrModel?: Gooey.DocSummaryPageRequestSelectedAsrModel; + googleTranslateTarget?: string; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/DocSummaryPageRequestSelectedAsrModel.ts b/src/api/types/DocSummaryPageRequestSelectedAsrModel.ts new file mode 100644 index 0000000..6668223 --- /dev/null +++ b/src/api/types/DocSummaryPageRequestSelectedAsrModel.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DocSummaryPageRequestSelectedAsrModel = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; + +export const DocSummaryPageRequestSelectedAsrModel = { + WhisperLargeV2: "whisper_large_v2", + WhisperLargeV3: "whisper_large_v3", + WhisperHindiLargeV2: "whisper_hindi_large_v2", + WhisperTeluguLargeV2: "whisper_telugu_large_v2", + NemoEnglish: "nemo_english", + NemoHindi: "nemo_hindi", + VakyanshBhojpuri: "vakyansh_bhojpuri", + GcpV1: "gcp_v1", + Usm: "usm", + Deepgram: "deepgram", + Azure: "azure", + SeamlessM4T: "seamless_m4t", + Mms1BAll: "mms_1b_all", +} as const; diff --git a/src/api/types/DocSummaryPageRequestSelectedModel.ts b/src/api/types/DocSummaryPageRequestSelectedModel.ts new file mode 100644 index 0000000..22cccc2 --- /dev/null +++ b/src/api/types/DocSummaryPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type DocSummaryPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const DocSummaryPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/DocSummaryPageResponse.ts b/src/api/types/DocSummaryPageResponse.ts new file mode 100644 index 0000000..4e57543 --- /dev/null +++ b/src/api/types/DocSummaryPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocSummaryPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.DocSummaryPageOutput; +} diff --git a/src/api/types/DocSummaryPageStatusResponse.ts b/src/api/types/DocSummaryPageStatusResponse.ts new file mode 100644 index 0000000..2dd6956 --- /dev/null +++ b/src/api/types/DocSummaryPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface DocSummaryPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.DocSummaryPageOutput; +} diff --git a/src/api/types/EmailFaceInpaintingPageOutput.ts b/src/api/types/EmailFaceInpaintingPageOutput.ts new file mode 100644 index 0000000..6480dfa --- /dev/null +++ b/src/api/types/EmailFaceInpaintingPageOutput.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface EmailFaceInpaintingPageOutput { + inputImage: string; + resizedImage: string; + faceMask: string; + diffusionImages: string[]; + outputImages: string[]; + emailSent?: boolean; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/EmailFaceInpaintingPageRequest.ts b/src/api/types/EmailFaceInpaintingPageRequest.ts new file mode 100644 index 0000000..d2ddc9c --- /dev/null +++ b/src/api/types/EmailFaceInpaintingPageRequest.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface EmailFaceInpaintingPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + emailAddress?: string; + twitterHandle?: string; + textPrompt: string; + faceScale?: number; + facePosX?: number; + facePosY?: number; + selectedModel?: Gooey.EmailFaceInpaintingPageRequestSelectedModel; + negativePrompt?: string; + numOutputs?: number; + quality?: number; + upscaleFactor?: number; + outputWidth?: number; + outputHeight?: number; + guidanceScale?: number; + shouldSendEmail?: boolean; + emailFrom?: string; + emailCc?: string; + emailBcc?: string; + emailSubject?: string; + emailBody?: string; + emailBodyEnableHtml?: boolean; + fallbackEmailBody?: string; + seed?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/EmailFaceInpaintingPageRequestSelectedModel.ts b/src/api/types/EmailFaceInpaintingPageRequestSelectedModel.ts new file mode 100644 index 0000000..19cc6b3 --- /dev/null +++ b/src/api/types/EmailFaceInpaintingPageRequestSelectedModel.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type EmailFaceInpaintingPageRequestSelectedModel = "sd_2" | "runway_ml" | "dall_e" | "jack_qiao"; + +export const EmailFaceInpaintingPageRequestSelectedModel = { + Sd2: "sd_2", + RunwayMl: "runway_ml", + DallE: "dall_e", + JackQiao: "jack_qiao", +} as const; diff --git a/src/api/types/EmailFaceInpaintingPageResponse.ts b/src/api/types/EmailFaceInpaintingPageResponse.ts new file mode 100644 index 0000000..ebe1d3e --- /dev/null +++ b/src/api/types/EmailFaceInpaintingPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface EmailFaceInpaintingPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.EmailFaceInpaintingPageOutput; +} diff --git a/src/api/types/EmailFaceInpaintingPageStatusResponse.ts b/src/api/types/EmailFaceInpaintingPageStatusResponse.ts new file mode 100644 index 0000000..fa810f8 --- /dev/null +++ b/src/api/types/EmailFaceInpaintingPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface EmailFaceInpaintingPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.EmailFaceInpaintingPageOutput; +} diff --git a/src/api/types/EmbeddingsPageOutput.ts b/src/api/types/EmbeddingsPageOutput.ts new file mode 100644 index 0000000..840e3ba --- /dev/null +++ b/src/api/types/EmbeddingsPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface EmbeddingsPageOutput { + embeddings: number[][]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/EmbeddingsPageRequest.ts b/src/api/types/EmbeddingsPageRequest.ts new file mode 100644 index 0000000..4614380 --- /dev/null +++ b/src/api/types/EmbeddingsPageRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface EmbeddingsPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + texts: string[]; + selectedModel?: Gooey.EmbeddingsPageRequestSelectedModel; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/EmbeddingsPageRequestSelectedModel.ts b/src/api/types/EmbeddingsPageRequestSelectedModel.ts new file mode 100644 index 0000000..87071e1 --- /dev/null +++ b/src/api/types/EmbeddingsPageRequestSelectedModel.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type EmbeddingsPageRequestSelectedModel = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; + +export const EmbeddingsPageRequestSelectedModel = { + Openai3Large: "openai_3_large", + Openai3Small: "openai_3_small", + OpenaiAda2: "openai_ada_2", + E5LargeV2: "e5_large_v2", + E5BaseV2: "e5_base_v2", + MultilingualE5Base: "multilingual_e5_base", + MultilingualE5Large: "multilingual_e5_large", + GteLarge: "gte_large", + GteBase: "gte_base", +} as const; diff --git a/src/api/types/EmbeddingsPageResponse.ts b/src/api/types/EmbeddingsPageResponse.ts new file mode 100644 index 0000000..6a3b6f3 --- /dev/null +++ b/src/api/types/EmbeddingsPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface EmbeddingsPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.EmbeddingsPageOutput; +} diff --git a/src/api/types/EmbeddingsPageStatusResponse.ts b/src/api/types/EmbeddingsPageStatusResponse.ts new file mode 100644 index 0000000..0f2ecd0 --- /dev/null +++ b/src/api/types/EmbeddingsPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface EmbeddingsPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.EmbeddingsPageOutput; +} diff --git a/src/api/types/EvalPrompt.ts b/src/api/types/EvalPrompt.ts new file mode 100644 index 0000000..9255dfe --- /dev/null +++ b/src/api/types/EvalPrompt.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface EvalPrompt { + name: string; + prompt: string; +} diff --git a/src/api/types/FaceInpaintingPageOutput.ts b/src/api/types/FaceInpaintingPageOutput.ts new file mode 100644 index 0000000..de8eeea --- /dev/null +++ b/src/api/types/FaceInpaintingPageOutput.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FaceInpaintingPageOutput { + resizedImage: string; + faceMask: string; + diffusionImages: string[]; + outputImages: string[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/FaceInpaintingPageRequest.ts b/src/api/types/FaceInpaintingPageRequest.ts new file mode 100644 index 0000000..85aad75 --- /dev/null +++ b/src/api/types/FaceInpaintingPageRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FaceInpaintingPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputImage: string; + textPrompt: string; + faceScale?: number; + facePosX?: number; + facePosY?: number; + selectedModel?: Gooey.FaceInpaintingPageRequestSelectedModel; + negativePrompt?: string; + numOutputs?: number; + quality?: number; + upscaleFactor?: number; + outputWidth?: number; + outputHeight?: number; + guidanceScale?: number; + seed?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/FaceInpaintingPageRequestSelectedModel.ts b/src/api/types/FaceInpaintingPageRequestSelectedModel.ts new file mode 100644 index 0000000..a022194 --- /dev/null +++ b/src/api/types/FaceInpaintingPageRequestSelectedModel.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type FaceInpaintingPageRequestSelectedModel = "sd_2" | "runway_ml" | "dall_e" | "jack_qiao"; + +export const FaceInpaintingPageRequestSelectedModel = { + Sd2: "sd_2", + RunwayMl: "runway_ml", + DallE: "dall_e", + JackQiao: "jack_qiao", +} as const; diff --git a/src/api/types/FaceInpaintingPageResponse.ts b/src/api/types/FaceInpaintingPageResponse.ts new file mode 100644 index 0000000..82a57fe --- /dev/null +++ b/src/api/types/FaceInpaintingPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FaceInpaintingPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.FaceInpaintingPageOutput; +} diff --git a/src/api/types/FaceInpaintingPageStatusResponse.ts b/src/api/types/FaceInpaintingPageStatusResponse.ts new file mode 100644 index 0000000..a7f434c --- /dev/null +++ b/src/api/types/FaceInpaintingPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FaceInpaintingPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.FaceInpaintingPageOutput; +} diff --git a/src/api/types/FailedReponseModelV2.ts b/src/api/types/FailedReponseModelV2.ts new file mode 100644 index 0000000..f6d0030 --- /dev/null +++ b/src/api/types/FailedReponseModelV2.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FailedReponseModelV2 { + detail: Gooey.FailedResponseDetail; +} diff --git a/src/api/types/FailedResponseDetail.ts b/src/api/types/FailedResponseDetail.ts new file mode 100644 index 0000000..c7251da --- /dev/null +++ b/src/api/types/FailedResponseDetail.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface FailedResponseDetail { + /** Unique ID for this run */ + id?: string; + /** Web URL for this run */ + url?: string; + /** Time when the run was created as ISO format */ + createdAt?: string; + /** Error message if the run failed */ + error?: string; +} diff --git a/src/api/types/FinalResponse.ts b/src/api/types/FinalResponse.ts new file mode 100644 index 0000000..720b8e8 --- /dev/null +++ b/src/api/types/FinalResponse.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FinalResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.ResponseModel; + /** The run has completed. Use the `status_url` to check the status of the run and fetch the complete output. */ + type?: string; +} diff --git a/src/api/types/Function.ts b/src/api/types/Function.ts new file mode 100644 index 0000000..6458162 --- /dev/null +++ b/src/api/types/Function.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Function = + | "mean" + | "median" + | "min" + | "max" + | "sum" + | "cumsum" + | "prod" + | "cumprod" + | "std" + | "var" + | "first" + | "last" + | "count" + | "cumcount" + | "nunique" + | "rank"; + +export const Function = { + Mean: "mean", + Median: "median", + Min: "min", + Max: "max", + Sum: "sum", + Cumsum: "cumsum", + Prod: "prod", + Cumprod: "cumprod", + Std: "std", + Var: "var", + First: "first", + Last: "last", + Count: "count", + Cumcount: "cumcount", + Nunique: "nunique", + Rank: "rank", +} as const; diff --git a/src/api/types/FunctionsPageOutput.ts b/src/api/types/FunctionsPageOutput.ts new file mode 100644 index 0000000..413cdfe --- /dev/null +++ b/src/api/types/FunctionsPageOutput.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FunctionsPageOutput { + returnValue?: unknown; + /** JS Error from the code. If there are no errors, this will be null */ + error?: string; + /** Console logs from the code execution */ + logs?: Gooey.ConsoleLogs[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/FunctionsPageRequest.ts b/src/api/types/FunctionsPageRequest.ts new file mode 100644 index 0000000..5fa2515 --- /dev/null +++ b/src/api/types/FunctionsPageRequest.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FunctionsPageRequest { + /** The JS code to be executed. */ + code?: string; + /** Variables to be used in the code */ + variables?: Record; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/FunctionsPageResponse.ts b/src/api/types/FunctionsPageResponse.ts new file mode 100644 index 0000000..726e4a6 --- /dev/null +++ b/src/api/types/FunctionsPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FunctionsPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.FunctionsPageOutput; +} diff --git a/src/api/types/FunctionsPageStatusResponse.ts b/src/api/types/FunctionsPageStatusResponse.ts new file mode 100644 index 0000000..325f29c --- /dev/null +++ b/src/api/types/FunctionsPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface FunctionsPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.FunctionsPageOutput; +} diff --git a/src/api/types/GenericErrorResponse.ts b/src/api/types/GenericErrorResponse.ts new file mode 100644 index 0000000..ee84e2a --- /dev/null +++ b/src/api/types/GenericErrorResponse.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GenericErrorResponse { + detail: Gooey.GenericErrorResponseDetail; +} diff --git a/src/api/types/GenericErrorResponseDetail.ts b/src/api/types/GenericErrorResponseDetail.ts new file mode 100644 index 0000000..2bae7ef --- /dev/null +++ b/src/api/types/GenericErrorResponseDetail.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface GenericErrorResponseDetail { + error: string; +} diff --git a/src/api/types/GoogleGptPageOutput.ts b/src/api/types/GoogleGptPageOutput.ts new file mode 100644 index 0000000..da7eb42 --- /dev/null +++ b/src/api/types/GoogleGptPageOutput.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GoogleGptPageOutput { + outputText: string[]; + serpResults: Record; + references: Gooey.SearchReference[]; + finalPrompt: string; + finalSearchQuery?: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/GoogleGptPageRequest.ts b/src/api/types/GoogleGptPageRequest.ts new file mode 100644 index 0000000..21a424d --- /dev/null +++ b/src/api/types/GoogleGptPageRequest.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GoogleGptPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + serpSearchLocation?: Gooey.SerpSearchLocation; + /** DEPRECATED: use `serp_search_location` instead */ + scaleserpLocations?: string[]; + serpSearchType?: Gooey.SerpSearchType; + /** DEPRECATED: use `serp_search_type` instead */ + scaleserpSearchField?: string; + searchQuery: string; + siteFilter: string; + taskInstructions?: string; + queryInstructions?: string; + selectedModel?: Gooey.GoogleGptPageRequestSelectedModel; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + maxSearchUrls?: number; + maxReferences?: number; + maxContextWords?: number; + scrollJump?: number; + embeddingModel?: Gooey.GoogleGptPageRequestEmbeddingModel; + /** + * Weightage for dense vs sparse embeddings. `0` for sparse, `1` for dense, `0.5` for equal weight. + * Generally speaking, dense embeddings excel at understanding the context of the query, whereas sparse vectors excel at keyword matches. + */ + denseWeight?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/GoogleGptPageRequestEmbeddingModel.ts b/src/api/types/GoogleGptPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..04e3da0 --- /dev/null +++ b/src/api/types/GoogleGptPageRequestEmbeddingModel.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GoogleGptPageRequestEmbeddingModel = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; + +export const GoogleGptPageRequestEmbeddingModel = { + Openai3Large: "openai_3_large", + Openai3Small: "openai_3_small", + OpenaiAda2: "openai_ada_2", + E5LargeV2: "e5_large_v2", + E5BaseV2: "e5_base_v2", + MultilingualE5Base: "multilingual_e5_base", + MultilingualE5Large: "multilingual_e5_large", + GteLarge: "gte_large", + GteBase: "gte_base", +} as const; diff --git a/src/api/types/GoogleGptPageRequestSelectedModel.ts b/src/api/types/GoogleGptPageRequestSelectedModel.ts new file mode 100644 index 0000000..34e4d6f --- /dev/null +++ b/src/api/types/GoogleGptPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GoogleGptPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const GoogleGptPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/GoogleGptPageResponse.ts b/src/api/types/GoogleGptPageResponse.ts new file mode 100644 index 0000000..dbc244e --- /dev/null +++ b/src/api/types/GoogleGptPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GoogleGptPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.GoogleGptPageOutput; +} diff --git a/src/api/types/GoogleGptPageStatusResponse.ts b/src/api/types/GoogleGptPageStatusResponse.ts new file mode 100644 index 0000000..c0d9156 --- /dev/null +++ b/src/api/types/GoogleGptPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GoogleGptPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.GoogleGptPageOutput; +} diff --git a/src/api/types/GoogleImageGenPageOutput.ts b/src/api/types/GoogleImageGenPageOutput.ts new file mode 100644 index 0000000..f291ab0 --- /dev/null +++ b/src/api/types/GoogleImageGenPageOutput.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GoogleImageGenPageOutput { + outputImages: string[]; + imageUrls: string[]; + selectedImage?: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/GoogleImageGenPageRequest.ts b/src/api/types/GoogleImageGenPageRequest.ts new file mode 100644 index 0000000..4b027e3 --- /dev/null +++ b/src/api/types/GoogleImageGenPageRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GoogleImageGenPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + serpSearchLocation?: Gooey.SerpSearchLocation; + /** DEPRECATED: use `serp_search_location` instead */ + scaleserpLocations?: string[]; + searchQuery: string; + textPrompt: string; + selectedModel?: Gooey.GoogleImageGenPageRequestSelectedModel; + negativePrompt?: string; + numOutputs?: number; + quality?: number; + guidanceScale?: number; + promptStrength?: number; + sd2Upscaling?: boolean; + seed?: number; + imageGuidanceScale?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/GoogleImageGenPageRequestSelectedModel.ts b/src/api/types/GoogleImageGenPageRequestSelectedModel.ts new file mode 100644 index 0000000..9dc44ff --- /dev/null +++ b/src/api/types/GoogleImageGenPageRequestSelectedModel.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GoogleImageGenPageRequestSelectedModel = + | "dream_shaper" + | "dreamlike_2" + | "sd_2" + | "sd_1_5" + | "dall_e" + | "instruct_pix2pix" + | "openjourney_2" + | "openjourney" + | "analog_diffusion" + | "protogen_5_3" + | "jack_qiao" + | "rodent_diffusion_1_5"; + +export const GoogleImageGenPageRequestSelectedModel = { + DreamShaper: "dream_shaper", + Dreamlike2: "dreamlike_2", + Sd2: "sd_2", + Sd15: "sd_1_5", + DallE: "dall_e", + InstructPix2Pix: "instruct_pix2pix", + Openjourney2: "openjourney_2", + Openjourney: "openjourney", + AnalogDiffusion: "analog_diffusion", + Protogen53: "protogen_5_3", + JackQiao: "jack_qiao", + RodentDiffusion15: "rodent_diffusion_1_5", +} as const; diff --git a/src/api/types/GoogleImageGenPageResponse.ts b/src/api/types/GoogleImageGenPageResponse.ts new file mode 100644 index 0000000..9c20e60 --- /dev/null +++ b/src/api/types/GoogleImageGenPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GoogleImageGenPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.GoogleImageGenPageOutput; +} diff --git a/src/api/types/GoogleImageGenPageStatusResponse.ts b/src/api/types/GoogleImageGenPageStatusResponse.ts new file mode 100644 index 0000000..ccdc5c8 --- /dev/null +++ b/src/api/types/GoogleImageGenPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface GoogleImageGenPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.GoogleImageGenPageOutput; +} diff --git a/src/api/types/HttpValidationError.ts b/src/api/types/HttpValidationError.ts new file mode 100644 index 0000000..dd16508 --- /dev/null +++ b/src/api/types/HttpValidationError.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface HttpValidationError { + detail?: Gooey.ValidationError[]; +} diff --git a/src/api/types/ImageSegmentationPageOutput.ts b/src/api/types/ImageSegmentationPageOutput.ts new file mode 100644 index 0000000..4fa10ff --- /dev/null +++ b/src/api/types/ImageSegmentationPageOutput.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ImageSegmentationPageOutput { + outputImage: string; + cutoutImage: string; + resizedImage: string; + resizedMask: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/ImageSegmentationPageRequest.ts b/src/api/types/ImageSegmentationPageRequest.ts new file mode 100644 index 0000000..546b8d5 --- /dev/null +++ b/src/api/types/ImageSegmentationPageRequest.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ImageSegmentationPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputImage: string; + selectedModel?: Gooey.ImageSegmentationPageRequestSelectedModel; + maskThreshold?: number; + rectPersepectiveTransform?: boolean; + reflectionOpacity?: number; + objScale?: number; + objPosX?: number; + objPosY?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/ImageSegmentationPageRequestSelectedModel.ts b/src/api/types/ImageSegmentationPageRequestSelectedModel.ts new file mode 100644 index 0000000..34d3972 --- /dev/null +++ b/src/api/types/ImageSegmentationPageRequestSelectedModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ImageSegmentationPageRequestSelectedModel = "dis" | "u2net"; + +export const ImageSegmentationPageRequestSelectedModel = { + Dis: "dis", + U2Net: "u2net", +} as const; diff --git a/src/api/types/ImageSegmentationPageResponse.ts b/src/api/types/ImageSegmentationPageResponse.ts new file mode 100644 index 0000000..37b67f9 --- /dev/null +++ b/src/api/types/ImageSegmentationPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ImageSegmentationPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.ImageSegmentationPageOutput; +} diff --git a/src/api/types/ImageSegmentationPageStatusResponse.ts b/src/api/types/ImageSegmentationPageStatusResponse.ts new file mode 100644 index 0000000..b97585b --- /dev/null +++ b/src/api/types/ImageSegmentationPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ImageSegmentationPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.ImageSegmentationPageOutput; +} diff --git a/src/api/types/ImageUrl.ts b/src/api/types/ImageUrl.ts new file mode 100644 index 0000000..c7d577b --- /dev/null +++ b/src/api/types/ImageUrl.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ImageUrl { + url?: string; + detail?: Gooey.Detail; +} diff --git a/src/api/types/Img2ImgPageOutput.ts b/src/api/types/Img2ImgPageOutput.ts new file mode 100644 index 0000000..2571a6b --- /dev/null +++ b/src/api/types/Img2ImgPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface Img2ImgPageOutput { + outputImages: string[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/Img2ImgPageRequest.ts b/src/api/types/Img2ImgPageRequest.ts new file mode 100644 index 0000000..252bc47 --- /dev/null +++ b/src/api/types/Img2ImgPageRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface Img2ImgPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputImage: string; + textPrompt?: string; + selectedModel?: Gooey.Img2ImgPageRequestSelectedModel; + selectedControlnetModel?: Gooey.Img2ImgPageRequestSelectedControlnetModel; + negativePrompt?: string; + numOutputs?: number; + quality?: number; + outputWidth?: number; + outputHeight?: number; + guidanceScale?: number; + promptStrength?: number; + controlnetConditioningScale?: number[]; + seed?: number; + imageGuidanceScale?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/Img2ImgPageRequestSelectedControlnetModel.ts b/src/api/types/Img2ImgPageRequestSelectedControlnetModel.ts new file mode 100644 index 0000000..69dd726 --- /dev/null +++ b/src/api/types/Img2ImgPageRequestSelectedControlnetModel.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export type Img2ImgPageRequestSelectedControlnetModel = + | Gooey.Img2ImgPageRequestSelectedControlnetModelItem[] + | "sd_controlnet_canny" + | "sd_controlnet_depth" + | "sd_controlnet_hed" + | "sd_controlnet_mlsd" + | "sd_controlnet_normal" + | "sd_controlnet_openpose" + | "sd_controlnet_scribble" + | "sd_controlnet_seg" + | "sd_controlnet_tile" + | "sd_controlnet_brightness" + | "control_v1p_sd15_qrcode_monster_v2"; diff --git a/src/api/types/Img2ImgPageRequestSelectedControlnetModelItem.ts b/src/api/types/Img2ImgPageRequestSelectedControlnetModelItem.ts new file mode 100644 index 0000000..af039e4 --- /dev/null +++ b/src/api/types/Img2ImgPageRequestSelectedControlnetModelItem.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Img2ImgPageRequestSelectedControlnetModelItem = + | "sd_controlnet_canny" + | "sd_controlnet_depth" + | "sd_controlnet_hed" + | "sd_controlnet_mlsd" + | "sd_controlnet_normal" + | "sd_controlnet_openpose" + | "sd_controlnet_scribble" + | "sd_controlnet_seg" + | "sd_controlnet_tile" + | "sd_controlnet_brightness" + | "control_v1p_sd15_qrcode_monster_v2"; + +export const Img2ImgPageRequestSelectedControlnetModelItem = { + SdControlnetCanny: "sd_controlnet_canny", + SdControlnetDepth: "sd_controlnet_depth", + SdControlnetHed: "sd_controlnet_hed", + SdControlnetMlsd: "sd_controlnet_mlsd", + SdControlnetNormal: "sd_controlnet_normal", + SdControlnetOpenpose: "sd_controlnet_openpose", + SdControlnetScribble: "sd_controlnet_scribble", + SdControlnetSeg: "sd_controlnet_seg", + SdControlnetTile: "sd_controlnet_tile", + SdControlnetBrightness: "sd_controlnet_brightness", + ControlV1PSd15QrcodeMonsterV2: "control_v1p_sd15_qrcode_monster_v2", +} as const; diff --git a/src/api/types/Img2ImgPageRequestSelectedModel.ts b/src/api/types/Img2ImgPageRequestSelectedModel.ts new file mode 100644 index 0000000..822e9bc --- /dev/null +++ b/src/api/types/Img2ImgPageRequestSelectedModel.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Img2ImgPageRequestSelectedModel = + | "dream_shaper" + | "dreamlike_2" + | "sd_2" + | "sd_1_5" + | "dall_e" + | "instruct_pix2pix" + | "openjourney_2" + | "openjourney" + | "analog_diffusion" + | "protogen_5_3" + | "jack_qiao" + | "rodent_diffusion_1_5"; + +export const Img2ImgPageRequestSelectedModel = { + DreamShaper: "dream_shaper", + Dreamlike2: "dreamlike_2", + Sd2: "sd_2", + Sd15: "sd_1_5", + DallE: "dall_e", + InstructPix2Pix: "instruct_pix2pix", + Openjourney2: "openjourney_2", + Openjourney: "openjourney", + AnalogDiffusion: "analog_diffusion", + Protogen53: "protogen_5_3", + JackQiao: "jack_qiao", + RodentDiffusion15: "rodent_diffusion_1_5", +} as const; diff --git a/src/api/types/Img2ImgPageResponse.ts b/src/api/types/Img2ImgPageResponse.ts new file mode 100644 index 0000000..7a4f4e2 --- /dev/null +++ b/src/api/types/Img2ImgPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface Img2ImgPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.Img2ImgPageOutput; +} diff --git a/src/api/types/Img2ImgPageStatusResponse.ts b/src/api/types/Img2ImgPageStatusResponse.ts new file mode 100644 index 0000000..769c3bd --- /dev/null +++ b/src/api/types/Img2ImgPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface Img2ImgPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.Img2ImgPageOutput; +} diff --git a/src/api/types/LetterWriterPageOutput.ts b/src/api/types/LetterWriterPageOutput.ts new file mode 100644 index 0000000..c4fce60 --- /dev/null +++ b/src/api/types/LetterWriterPageOutput.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LetterWriterPageOutput { + outputLetters: string[]; + responseJson?: unknown; + generatedInputPrompt: string; + finalPrompt: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/LetterWriterPageRequest.ts b/src/api/types/LetterWriterPageRequest.ts new file mode 100644 index 0000000..bd1c8a9 --- /dev/null +++ b/src/api/types/LetterWriterPageRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LetterWriterPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + actionId: string; + promptHeader?: string; + exampleLetters?: Gooey.TrainingDataModel[]; + lmSelectedApi?: string; + lmSelectedEngine?: string; + numOutputs?: number; + quality?: number; + lmSamplingTemperature?: number; + apiHttpMethod?: string; + apiUrl?: string; + apiHeaders?: string; + apiJsonBody?: string; + inputPrompt?: string; + stripHtml2Text?: boolean; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/LetterWriterPageResponse.ts b/src/api/types/LetterWriterPageResponse.ts new file mode 100644 index 0000000..5cd0e0d --- /dev/null +++ b/src/api/types/LetterWriterPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LetterWriterPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.LetterWriterPageOutput; +} diff --git a/src/api/types/LetterWriterPageStatusResponse.ts b/src/api/types/LetterWriterPageStatusResponse.ts new file mode 100644 index 0000000..f807a15 --- /dev/null +++ b/src/api/types/LetterWriterPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LetterWriterPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.LetterWriterPageOutput; +} diff --git a/src/api/types/Level.ts b/src/api/types/Level.ts new file mode 100644 index 0000000..d23f6aa --- /dev/null +++ b/src/api/types/Level.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Level = "log" | "error"; + +export const Level = { + Log: "log", + Error: "error", +} as const; diff --git a/src/api/types/LipsyncPageOutput.ts b/src/api/types/LipsyncPageOutput.ts new file mode 100644 index 0000000..13aebf3 --- /dev/null +++ b/src/api/types/LipsyncPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LipsyncPageOutput { + outputVideo: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/LipsyncPageRequest.ts b/src/api/types/LipsyncPageRequest.ts new file mode 100644 index 0000000..8000477 --- /dev/null +++ b/src/api/types/LipsyncPageRequest.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LipsyncPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputFace?: string; + facePaddingTop?: number; + facePaddingBottom?: number; + facePaddingLeft?: number; + facePaddingRight?: number; + sadtalkerSettings?: Gooey.SadTalkerSettings; + selectedModel?: Gooey.LipsyncPageRequestSelectedModel; + inputAudio?: string; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/LipsyncPageRequestSelectedModel.ts b/src/api/types/LipsyncPageRequestSelectedModel.ts new file mode 100644 index 0000000..9351bcb --- /dev/null +++ b/src/api/types/LipsyncPageRequestSelectedModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LipsyncPageRequestSelectedModel = "Wav2Lip" | "SadTalker"; + +export const LipsyncPageRequestSelectedModel = { + Wav2Lip: "Wav2Lip", + SadTalker: "SadTalker", +} as const; diff --git a/src/api/types/LipsyncPageResponse.ts b/src/api/types/LipsyncPageResponse.ts new file mode 100644 index 0000000..1e70861 --- /dev/null +++ b/src/api/types/LipsyncPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LipsyncPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.LipsyncPageOutput; +} diff --git a/src/api/types/LipsyncPageStatusResponse.ts b/src/api/types/LipsyncPageStatusResponse.ts new file mode 100644 index 0000000..a01f069 --- /dev/null +++ b/src/api/types/LipsyncPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LipsyncPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.LipsyncPageOutput; +} diff --git a/src/api/types/LipsyncTtsPageOutput.ts b/src/api/types/LipsyncTtsPageOutput.ts new file mode 100644 index 0000000..4431190 --- /dev/null +++ b/src/api/types/LipsyncTtsPageOutput.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LipsyncTtsPageOutput { + audioUrl?: string; + outputVideo: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/LipsyncTtsPageRequest.ts b/src/api/types/LipsyncTtsPageRequest.ts new file mode 100644 index 0000000..a0b93f4 --- /dev/null +++ b/src/api/types/LipsyncTtsPageRequest.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LipsyncTtsPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + textPrompt: string; + ttsProvider?: Gooey.LipsyncTtsPageRequestTtsProvider; + uberduckVoiceName?: string; + uberduckSpeakingRate?: number; + googleVoiceName?: string; + googleSpeakingRate?: number; + googlePitch?: number; + barkHistoryPrompt?: string; + /** Use `elevenlabs_voice_id` instead */ + elevenlabsVoiceName?: string; + elevenlabsApiKey?: string; + elevenlabsVoiceId?: string; + elevenlabsModel?: string; + elevenlabsStability?: number; + elevenlabsSimilarityBoost?: number; + elevenlabsStyle?: number; + elevenlabsSpeakerBoost?: boolean; + azureVoiceName?: string; + openaiVoiceName?: Gooey.LipsyncTtsPageRequestOpenaiVoiceName; + openaiTtsModel?: Gooey.LipsyncTtsPageRequestOpenaiTtsModel; + inputFace?: string; + facePaddingTop?: number; + facePaddingBottom?: number; + facePaddingLeft?: number; + facePaddingRight?: number; + sadtalkerSettings?: Gooey.SadTalkerSettings; + selectedModel?: Gooey.LipsyncTtsPageRequestSelectedModel; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/LipsyncTtsPageRequestOpenaiTtsModel.ts b/src/api/types/LipsyncTtsPageRequestOpenaiTtsModel.ts new file mode 100644 index 0000000..71f7dce --- /dev/null +++ b/src/api/types/LipsyncTtsPageRequestOpenaiTtsModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LipsyncTtsPageRequestOpenaiTtsModel = "tts_1" | "tts_1_hd"; + +export const LipsyncTtsPageRequestOpenaiTtsModel = { + Tts1: "tts_1", + Tts1Hd: "tts_1_hd", +} as const; diff --git a/src/api/types/LipsyncTtsPageRequestOpenaiVoiceName.ts b/src/api/types/LipsyncTtsPageRequestOpenaiVoiceName.ts new file mode 100644 index 0000000..7f5899b --- /dev/null +++ b/src/api/types/LipsyncTtsPageRequestOpenaiVoiceName.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LipsyncTtsPageRequestOpenaiVoiceName = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; + +export const LipsyncTtsPageRequestOpenaiVoiceName = { + Alloy: "alloy", + Echo: "echo", + Fable: "fable", + Onyx: "onyx", + Nova: "nova", + Shimmer: "shimmer", +} as const; diff --git a/src/api/types/LipsyncTtsPageRequestSelectedModel.ts b/src/api/types/LipsyncTtsPageRequestSelectedModel.ts new file mode 100644 index 0000000..2c15926 --- /dev/null +++ b/src/api/types/LipsyncTtsPageRequestSelectedModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LipsyncTtsPageRequestSelectedModel = "Wav2Lip" | "SadTalker"; + +export const LipsyncTtsPageRequestSelectedModel = { + Wav2Lip: "Wav2Lip", + SadTalker: "SadTalker", +} as const; diff --git a/src/api/types/LipsyncTtsPageRequestTtsProvider.ts b/src/api/types/LipsyncTtsPageRequestTtsProvider.ts new file mode 100644 index 0000000..f558fae --- /dev/null +++ b/src/api/types/LipsyncTtsPageRequestTtsProvider.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LipsyncTtsPageRequestTtsProvider = + | "GOOGLE_TTS" + | "ELEVEN_LABS" + | "UBERDUCK" + | "BARK" + | "AZURE_TTS" + | "OPEN_AI"; + +export const LipsyncTtsPageRequestTtsProvider = { + GoogleTts: "GOOGLE_TTS", + ElevenLabs: "ELEVEN_LABS", + Uberduck: "UBERDUCK", + Bark: "BARK", + AzureTts: "AZURE_TTS", + OpenAi: "OPEN_AI", +} as const; diff --git a/src/api/types/LipsyncTtsPageResponse.ts b/src/api/types/LipsyncTtsPageResponse.ts new file mode 100644 index 0000000..df00b1c --- /dev/null +++ b/src/api/types/LipsyncTtsPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LipsyncTtsPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.LipsyncTtsPageOutput; +} diff --git a/src/api/types/LipsyncTtsPageStatusResponse.ts b/src/api/types/LipsyncTtsPageStatusResponse.ts new file mode 100644 index 0000000..3252556 --- /dev/null +++ b/src/api/types/LipsyncTtsPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface LipsyncTtsPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.LipsyncTtsPageOutput; +} diff --git a/src/api/types/LlmTools.ts b/src/api/types/LlmTools.ts new file mode 100644 index 0000000..c053be0 --- /dev/null +++ b/src/api/types/LlmTools.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * An enumeration. + */ +export type LlmTools = "json_to_pdf"; diff --git a/src/api/types/MessagePart.ts b/src/api/types/MessagePart.ts new file mode 100644 index 0000000..b1bd048 --- /dev/null +++ b/src/api/types/MessagePart.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface MessagePart { + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + text?: string; + audio?: string; + video?: string; + buttons?: Gooey.ReplyButton[]; + documents?: string[]; + /** The partial outputs from the bot will be streamed in parts. Use this to update the user interface iteratively. */ + type?: string; +} diff --git a/src/api/types/ObjectInpaintingPageOutput.ts b/src/api/types/ObjectInpaintingPageOutput.ts new file mode 100644 index 0000000..775f009 --- /dev/null +++ b/src/api/types/ObjectInpaintingPageOutput.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ObjectInpaintingPageOutput { + resizedImage: string; + objMask: string; + outputImages: string[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/ObjectInpaintingPageRequest.ts b/src/api/types/ObjectInpaintingPageRequest.ts new file mode 100644 index 0000000..dfd8a58 --- /dev/null +++ b/src/api/types/ObjectInpaintingPageRequest.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ObjectInpaintingPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputImage: string; + textPrompt: string; + objScale?: number; + objPosX?: number; + objPosY?: number; + maskThreshold?: number; + selectedModel?: Gooey.ObjectInpaintingPageRequestSelectedModel; + negativePrompt?: string; + numOutputs?: number; + quality?: number; + outputWidth?: number; + outputHeight?: number; + guidanceScale?: number; + sd2Upscaling?: boolean; + seed?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/ObjectInpaintingPageRequestSelectedModel.ts b/src/api/types/ObjectInpaintingPageRequestSelectedModel.ts new file mode 100644 index 0000000..430601a --- /dev/null +++ b/src/api/types/ObjectInpaintingPageRequestSelectedModel.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ObjectInpaintingPageRequestSelectedModel = "sd_2" | "runway_ml" | "dall_e" | "jack_qiao"; + +export const ObjectInpaintingPageRequestSelectedModel = { + Sd2: "sd_2", + RunwayMl: "runway_ml", + DallE: "dall_e", + JackQiao: "jack_qiao", +} as const; diff --git a/src/api/types/ObjectInpaintingPageResponse.ts b/src/api/types/ObjectInpaintingPageResponse.ts new file mode 100644 index 0000000..483ae05 --- /dev/null +++ b/src/api/types/ObjectInpaintingPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ObjectInpaintingPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.ObjectInpaintingPageOutput; +} diff --git a/src/api/types/ObjectInpaintingPageStatusResponse.ts b/src/api/types/ObjectInpaintingPageStatusResponse.ts new file mode 100644 index 0000000..bee74fb --- /dev/null +++ b/src/api/types/ObjectInpaintingPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ObjectInpaintingPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.ObjectInpaintingPageOutput; +} diff --git a/src/api/types/Preprocess.ts b/src/api/types/Preprocess.ts new file mode 100644 index 0000000..c85bd29 --- /dev/null +++ b/src/api/types/Preprocess.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * SadTalker only generates 512x512 output. 'crop' handles this by cropping the input to 512x512. 'resize' scales down the input to fit 512x512 and scales it back up after lipsyncing (does not work well for full person images, better for portraits). 'full' processes the cropped region and pastes it back into the original input. 'extcrop' and 'extfull' are similar to 'crop' and 'full' but with extended cropping. + */ +export type Preprocess = "crop" | "extcrop" | "resize" | "full" | "extfull"; + +export const Preprocess = { + Crop: "crop", + Extcrop: "extcrop", + Resize: "resize", + Full: "full", + Extfull: "extfull", +} as const; diff --git a/src/api/types/Prompt.ts b/src/api/types/Prompt.ts new file mode 100644 index 0000000..dd6b963 --- /dev/null +++ b/src/api/types/Prompt.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export type Prompt = string | Gooey.ConversationEntry[]; diff --git a/src/api/types/PromptTreeNode.ts b/src/api/types/PromptTreeNode.ts new file mode 100644 index 0000000..ce6e4ea --- /dev/null +++ b/src/api/types/PromptTreeNode.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface PromptTreeNode { + prompt: Gooey.Prompt; + children: Gooey.PromptTreeNode[]; +} diff --git a/src/api/types/QrCodeGeneratorPageOutput.ts b/src/api/types/QrCodeGeneratorPageOutput.ts new file mode 100644 index 0000000..2c0c37f --- /dev/null +++ b/src/api/types/QrCodeGeneratorPageOutput.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface QrCodeGeneratorPageOutput { + outputImages: string[]; + rawImages: string[]; + shortenedUrl?: string; + cleanedQrCode: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/QrCodeGeneratorPageRequest.ts b/src/api/types/QrCodeGeneratorPageRequest.ts new file mode 100644 index 0000000..c4786ee --- /dev/null +++ b/src/api/types/QrCodeGeneratorPageRequest.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface QrCodeGeneratorPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + qrCodeData?: string; + qrCodeInputImage?: string; + qrCodeVcard?: Gooey.Vcard; + qrCodeFile?: string; + useUrlShortener?: boolean; + textPrompt: string; + negativePrompt?: string; + imagePrompt?: string; + imagePromptControlnetModels?: Gooey.QrCodeGeneratorPageRequestImagePromptControlnetModelsItem[]; + imagePromptStrength?: number; + imagePromptScale?: number; + imagePromptPosX?: number; + imagePromptPosY?: number; + selectedModel?: Gooey.QrCodeGeneratorPageRequestSelectedModel; + selectedControlnetModel?: Gooey.QrCodeGeneratorPageRequestSelectedControlnetModelItem[]; + outputWidth?: number; + outputHeight?: number; + guidanceScale?: number; + controlnetConditioningScale?: number[]; + numOutputs?: number; + quality?: number; + scheduler?: Gooey.Scheduler; + seed?: number; + objScale?: number; + objPosX?: number; + objPosY?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts b/src/api/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts new file mode 100644 index 0000000..2c4fd53 --- /dev/null +++ b/src/api/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type QrCodeGeneratorPageRequestImagePromptControlnetModelsItem = + | "sd_controlnet_canny" + | "sd_controlnet_depth" + | "sd_controlnet_hed" + | "sd_controlnet_mlsd" + | "sd_controlnet_normal" + | "sd_controlnet_openpose" + | "sd_controlnet_scribble" + | "sd_controlnet_seg" + | "sd_controlnet_tile" + | "sd_controlnet_brightness" + | "control_v1p_sd15_qrcode_monster_v2"; + +export const QrCodeGeneratorPageRequestImagePromptControlnetModelsItem = { + SdControlnetCanny: "sd_controlnet_canny", + SdControlnetDepth: "sd_controlnet_depth", + SdControlnetHed: "sd_controlnet_hed", + SdControlnetMlsd: "sd_controlnet_mlsd", + SdControlnetNormal: "sd_controlnet_normal", + SdControlnetOpenpose: "sd_controlnet_openpose", + SdControlnetScribble: "sd_controlnet_scribble", + SdControlnetSeg: "sd_controlnet_seg", + SdControlnetTile: "sd_controlnet_tile", + SdControlnetBrightness: "sd_controlnet_brightness", + ControlV1PSd15QrcodeMonsterV2: "control_v1p_sd15_qrcode_monster_v2", +} as const; diff --git a/src/api/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts b/src/api/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts new file mode 100644 index 0000000..3607125 --- /dev/null +++ b/src/api/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type QrCodeGeneratorPageRequestSelectedControlnetModelItem = + | "sd_controlnet_canny" + | "sd_controlnet_depth" + | "sd_controlnet_hed" + | "sd_controlnet_mlsd" + | "sd_controlnet_normal" + | "sd_controlnet_openpose" + | "sd_controlnet_scribble" + | "sd_controlnet_seg" + | "sd_controlnet_tile" + | "sd_controlnet_brightness" + | "control_v1p_sd15_qrcode_monster_v2"; + +export const QrCodeGeneratorPageRequestSelectedControlnetModelItem = { + SdControlnetCanny: "sd_controlnet_canny", + SdControlnetDepth: "sd_controlnet_depth", + SdControlnetHed: "sd_controlnet_hed", + SdControlnetMlsd: "sd_controlnet_mlsd", + SdControlnetNormal: "sd_controlnet_normal", + SdControlnetOpenpose: "sd_controlnet_openpose", + SdControlnetScribble: "sd_controlnet_scribble", + SdControlnetSeg: "sd_controlnet_seg", + SdControlnetTile: "sd_controlnet_tile", + SdControlnetBrightness: "sd_controlnet_brightness", + ControlV1PSd15QrcodeMonsterV2: "control_v1p_sd15_qrcode_monster_v2", +} as const; diff --git a/src/api/types/QrCodeGeneratorPageRequestSelectedModel.ts b/src/api/types/QrCodeGeneratorPageRequestSelectedModel.ts new file mode 100644 index 0000000..c146de0 --- /dev/null +++ b/src/api/types/QrCodeGeneratorPageRequestSelectedModel.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type QrCodeGeneratorPageRequestSelectedModel = + | "dream_shaper" + | "dreamlike_2" + | "sd_2" + | "sd_1_5" + | "dall_e" + | "dall_e_3" + | "openjourney_2" + | "openjourney" + | "analog_diffusion" + | "protogen_5_3" + | "jack_qiao" + | "rodent_diffusion_1_5" + | "deepfloyd_if"; + +export const QrCodeGeneratorPageRequestSelectedModel = { + DreamShaper: "dream_shaper", + Dreamlike2: "dreamlike_2", + Sd2: "sd_2", + Sd15: "sd_1_5", + DallE: "dall_e", + DallE3: "dall_e_3", + Openjourney2: "openjourney_2", + Openjourney: "openjourney", + AnalogDiffusion: "analog_diffusion", + Protogen53: "protogen_5_3", + JackQiao: "jack_qiao", + RodentDiffusion15: "rodent_diffusion_1_5", + DeepfloydIf: "deepfloyd_if", +} as const; diff --git a/src/api/types/QrCodeGeneratorPageResponse.ts b/src/api/types/QrCodeGeneratorPageResponse.ts new file mode 100644 index 0000000..054644f --- /dev/null +++ b/src/api/types/QrCodeGeneratorPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface QrCodeGeneratorPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.QrCodeGeneratorPageOutput; +} diff --git a/src/api/types/QrCodeGeneratorPageStatusResponse.ts b/src/api/types/QrCodeGeneratorPageStatusResponse.ts new file mode 100644 index 0000000..4dd770c --- /dev/null +++ b/src/api/types/QrCodeGeneratorPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface QrCodeGeneratorPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.QrCodeGeneratorPageOutput; +} diff --git a/src/api/types/RecipeFunction.ts b/src/api/types/RecipeFunction.ts new file mode 100644 index 0000000..a602fd1 --- /dev/null +++ b/src/api/types/RecipeFunction.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RecipeFunction { + /** The URL of the [function](https://gooey.ai/functions) to call. */ + url: string; + /** When to run this function. `pre` runs before the recipe, `post` runs after the recipe. */ + trigger: Gooey.Trigger; +} diff --git a/src/api/types/RecipeRunState.ts b/src/api/types/RecipeRunState.ts new file mode 100644 index 0000000..4d86e22 --- /dev/null +++ b/src/api/types/RecipeRunState.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * An enumeration. + */ +export type RecipeRunState = "starting" | "running" | "completed" | "failed"; + +export const RecipeRunState = { + Starting: "starting", + Running: "running", + Completed: "completed", + Failed: "failed", +} as const; diff --git a/src/api/types/RelatedDocSearchResponse.ts b/src/api/types/RelatedDocSearchResponse.ts new file mode 100644 index 0000000..25d91b5 --- /dev/null +++ b/src/api/types/RelatedDocSearchResponse.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedDocSearchResponse { + outputText: string[]; + references: Gooey.SearchReference[]; + finalPrompt: string; + finalSearchQuery?: string; + searchQuery: string; +} diff --git a/src/api/types/RelatedGoogleGptResponse.ts b/src/api/types/RelatedGoogleGptResponse.ts new file mode 100644 index 0000000..84869c6 --- /dev/null +++ b/src/api/types/RelatedGoogleGptResponse.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedGoogleGptResponse { + outputText: string[]; + serpResults: Record; + references: Gooey.SearchReference[]; + finalPrompt: string; + finalSearchQuery?: string; + searchQuery: string; +} diff --git a/src/api/types/RelatedQnADocPageOutput.ts b/src/api/types/RelatedQnADocPageOutput.ts new file mode 100644 index 0000000..feffe3a --- /dev/null +++ b/src/api/types/RelatedQnADocPageOutput.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedQnADocPageOutput { + outputQueries: Gooey.RelatedDocSearchResponse[]; + serpResults: Record; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/RelatedQnADocPageRequest.ts b/src/api/types/RelatedQnADocPageRequest.ts new file mode 100644 index 0000000..8bd50b1 --- /dev/null +++ b/src/api/types/RelatedQnADocPageRequest.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedQnADocPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + searchQuery: string; + keywordQuery?: Gooey.RelatedQnADocPageRequestKeywordQuery; + documents?: string[]; + maxReferences?: number; + maxContextWords?: number; + scrollJump?: number; + docExtractUrl?: string; + embeddingModel?: Gooey.RelatedQnADocPageRequestEmbeddingModel; + /** + * Weightage for dense vs sparse embeddings. `0` for sparse, `1` for dense, `0.5` for equal weight. + * Generally speaking, dense embeddings excel at understanding the context of the query, whereas sparse vectors excel at keyword matches. + */ + denseWeight?: number; + taskInstructions?: string; + queryInstructions?: string; + selectedModel?: Gooey.RelatedQnADocPageRequestSelectedModel; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + citationStyle?: Gooey.RelatedQnADocPageRequestCitationStyle; + serpSearchLocation?: Gooey.SerpSearchLocation; + /** DEPRECATED: use `serp_search_location` instead */ + scaleserpLocations?: string[]; + serpSearchType?: Gooey.SerpSearchType; + /** DEPRECATED: use `serp_search_type` instead */ + scaleserpSearchField?: string; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/RelatedQnADocPageRequestCitationStyle.ts b/src/api/types/RelatedQnADocPageRequestCitationStyle.ts new file mode 100644 index 0000000..1709230 --- /dev/null +++ b/src/api/types/RelatedQnADocPageRequestCitationStyle.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RelatedQnADocPageRequestCitationStyle = + | "number" + | "title" + | "url" + | "symbol" + | "markdown" + | "html" + | "slack_mrkdwn" + | "plaintext" + | "number_markdown" + | "number_html" + | "number_slack_mrkdwn" + | "number_plaintext" + | "symbol_markdown" + | "symbol_html" + | "symbol_slack_mrkdwn" + | "symbol_plaintext"; + +export const RelatedQnADocPageRequestCitationStyle = { + Number: "number", + Title: "title", + Url: "url", + Symbol: "symbol", + Markdown: "markdown", + Html: "html", + SlackMrkdwn: "slack_mrkdwn", + Plaintext: "plaintext", + NumberMarkdown: "number_markdown", + NumberHtml: "number_html", + NumberSlackMrkdwn: "number_slack_mrkdwn", + NumberPlaintext: "number_plaintext", + SymbolMarkdown: "symbol_markdown", + SymbolHtml: "symbol_html", + SymbolSlackMrkdwn: "symbol_slack_mrkdwn", + SymbolPlaintext: "symbol_plaintext", +} as const; diff --git a/src/api/types/RelatedQnADocPageRequestEmbeddingModel.ts b/src/api/types/RelatedQnADocPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..099e7bf --- /dev/null +++ b/src/api/types/RelatedQnADocPageRequestEmbeddingModel.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RelatedQnADocPageRequestEmbeddingModel = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; + +export const RelatedQnADocPageRequestEmbeddingModel = { + Openai3Large: "openai_3_large", + Openai3Small: "openai_3_small", + OpenaiAda2: "openai_ada_2", + E5LargeV2: "e5_large_v2", + E5BaseV2: "e5_base_v2", + MultilingualE5Base: "multilingual_e5_base", + MultilingualE5Large: "multilingual_e5_large", + GteLarge: "gte_large", + GteBase: "gte_base", +} as const; diff --git a/src/api/types/RelatedQnADocPageRequestKeywordQuery.ts b/src/api/types/RelatedQnADocPageRequestKeywordQuery.ts new file mode 100644 index 0000000..03d8220 --- /dev/null +++ b/src/api/types/RelatedQnADocPageRequestKeywordQuery.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RelatedQnADocPageRequestKeywordQuery = string | string[]; diff --git a/src/api/types/RelatedQnADocPageRequestSelectedModel.ts b/src/api/types/RelatedQnADocPageRequestSelectedModel.ts new file mode 100644 index 0000000..1346438 --- /dev/null +++ b/src/api/types/RelatedQnADocPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RelatedQnADocPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const RelatedQnADocPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/RelatedQnADocPageResponse.ts b/src/api/types/RelatedQnADocPageResponse.ts new file mode 100644 index 0000000..97c3747 --- /dev/null +++ b/src/api/types/RelatedQnADocPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedQnADocPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.RelatedQnADocPageOutput; +} diff --git a/src/api/types/RelatedQnADocPageStatusResponse.ts b/src/api/types/RelatedQnADocPageStatusResponse.ts new file mode 100644 index 0000000..5e39461 --- /dev/null +++ b/src/api/types/RelatedQnADocPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedQnADocPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.RelatedQnADocPageOutput; +} diff --git a/src/api/types/RelatedQnAPageOutput.ts b/src/api/types/RelatedQnAPageOutput.ts new file mode 100644 index 0000000..745b0ce --- /dev/null +++ b/src/api/types/RelatedQnAPageOutput.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedQnAPageOutput { + outputQueries: Gooey.RelatedGoogleGptResponse[]; + serpResults: Record; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/RelatedQnAPageRequest.ts b/src/api/types/RelatedQnAPageRequest.ts new file mode 100644 index 0000000..12bed93 --- /dev/null +++ b/src/api/types/RelatedQnAPageRequest.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedQnAPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + serpSearchLocation?: Gooey.SerpSearchLocation; + /** DEPRECATED: use `serp_search_location` instead */ + scaleserpLocations?: string[]; + serpSearchType?: Gooey.SerpSearchType; + /** DEPRECATED: use `serp_search_type` instead */ + scaleserpSearchField?: string; + searchQuery: string; + siteFilter: string; + taskInstructions?: string; + queryInstructions?: string; + selectedModel?: Gooey.RelatedQnAPageRequestSelectedModel; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + maxSearchUrls?: number; + maxReferences?: number; + maxContextWords?: number; + scrollJump?: number; + embeddingModel?: Gooey.RelatedQnAPageRequestEmbeddingModel; + /** + * Weightage for dense vs sparse embeddings. `0` for sparse, `1` for dense, `0.5` for equal weight. + * Generally speaking, dense embeddings excel at understanding the context of the query, whereas sparse vectors excel at keyword matches. + */ + denseWeight?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/RelatedQnAPageRequestEmbeddingModel.ts b/src/api/types/RelatedQnAPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..39ae645 --- /dev/null +++ b/src/api/types/RelatedQnAPageRequestEmbeddingModel.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RelatedQnAPageRequestEmbeddingModel = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; + +export const RelatedQnAPageRequestEmbeddingModel = { + Openai3Large: "openai_3_large", + Openai3Small: "openai_3_small", + OpenaiAda2: "openai_ada_2", + E5LargeV2: "e5_large_v2", + E5BaseV2: "e5_base_v2", + MultilingualE5Base: "multilingual_e5_base", + MultilingualE5Large: "multilingual_e5_large", + GteLarge: "gte_large", + GteBase: "gte_base", +} as const; diff --git a/src/api/types/RelatedQnAPageRequestSelectedModel.ts b/src/api/types/RelatedQnAPageRequestSelectedModel.ts new file mode 100644 index 0000000..4ec07bb --- /dev/null +++ b/src/api/types/RelatedQnAPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RelatedQnAPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const RelatedQnAPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/RelatedQnAPageResponse.ts b/src/api/types/RelatedQnAPageResponse.ts new file mode 100644 index 0000000..7206144 --- /dev/null +++ b/src/api/types/RelatedQnAPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedQnAPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.RelatedQnAPageOutput; +} diff --git a/src/api/types/RelatedQnAPageStatusResponse.ts b/src/api/types/RelatedQnAPageStatusResponse.ts new file mode 100644 index 0000000..94fdb99 --- /dev/null +++ b/src/api/types/RelatedQnAPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RelatedQnAPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.RelatedQnAPageOutput; +} diff --git a/src/api/types/ReplyButton.ts b/src/api/types/ReplyButton.ts new file mode 100644 index 0000000..6839877 --- /dev/null +++ b/src/api/types/ReplyButton.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ReplyButton { + id: string; + title: string; +} diff --git a/src/api/types/ResponseModel.ts b/src/api/types/ResponseModel.ts new file mode 100644 index 0000000..b873c79 --- /dev/null +++ b/src/api/types/ResponseModel.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ResponseModel { + finalPrompt?: Gooey.ResponseModelFinalPrompt; + outputText?: string[]; + outputAudio?: string[]; + outputVideo?: string[]; + rawInputText?: string; + rawTtsText?: string[]; + rawOutputText?: string[]; + references?: Gooey.SearchReference[]; + finalSearchQuery?: string; + finalKeywordQuery?: Gooey.ResponseModelFinalKeywordQuery; + outputDocuments?: string[]; + replyButtons?: Gooey.ReplyButton[]; + finishReason?: string[]; +} diff --git a/src/api/types/ResponseModelFinalKeywordQuery.ts b/src/api/types/ResponseModelFinalKeywordQuery.ts new file mode 100644 index 0000000..8755485 --- /dev/null +++ b/src/api/types/ResponseModelFinalKeywordQuery.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ResponseModelFinalKeywordQuery = string | string[]; diff --git a/src/api/types/ResponseModelFinalPrompt.ts b/src/api/types/ResponseModelFinalPrompt.ts new file mode 100644 index 0000000..7d04f48 --- /dev/null +++ b/src/api/types/ResponseModelFinalPrompt.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export type ResponseModelFinalPrompt = string | Gooey.ConversationEntry[]; diff --git a/src/api/types/Role.ts b/src/api/types/Role.ts new file mode 100644 index 0000000..50bc368 --- /dev/null +++ b/src/api/types/Role.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Role = "user" | "system" | "assistant"; + +export const Role = { + User: "user", + System: "system", + Assistant: "assistant", +} as const; diff --git a/src/api/types/RunSettings.ts b/src/api/types/RunSettings.ts new file mode 100644 index 0000000..7e9c19e --- /dev/null +++ b/src/api/types/RunSettings.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface RunSettings { + /** Policy for retaining the run data. */ + retentionPolicy?: Gooey.RunSettingsRetentionPolicy; +} diff --git a/src/api/types/RunSettingsRetentionPolicy.ts b/src/api/types/RunSettingsRetentionPolicy.ts new file mode 100644 index 0000000..3bb8062 --- /dev/null +++ b/src/api/types/RunSettingsRetentionPolicy.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Policy for retaining the run data. + */ +export type RunSettingsRetentionPolicy = "keep" | "delete"; + +export const RunSettingsRetentionPolicy = { + Keep: "keep", + Delete: "delete", +} as const; diff --git a/src/api/types/RunStart.ts b/src/api/types/RunStart.ts new file mode 100644 index 0000000..273c696 --- /dev/null +++ b/src/api/types/RunStart.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface RunStart { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** URL to check the status of the run. Also included in the `Location` header of the response. */ + statusUrl: string; + /** The run was started. Save the IDs for future requests.Use the `status_url` to check the status of the run and fetch the complete output. */ + type?: string; +} diff --git a/src/api/types/SadTalkerSettings.ts b/src/api/types/SadTalkerSettings.ts new file mode 100644 index 0000000..f305f5b --- /dev/null +++ b/src/api/types/SadTalkerSettings.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SadTalkerSettings { + still?: boolean; + /** SadTalker only generates 512x512 output. 'crop' handles this by cropping the input to 512x512. 'resize' scales down the input to fit 512x512 and scales it back up after lipsyncing (does not work well for full person images, better for portraits). 'full' processes the cropped region and pastes it back into the original input. 'extcrop' and 'extfull' are similar to 'crop' and 'full' but with extended cropping. */ + preprocess?: Gooey.Preprocess; + /** Random seed 0-45 inclusive that affects how the pose is animated. */ + poseStyle?: number; + /** Scale the amount of expression motion. 1.0 is normal, 0.5 is very reduced, and 2.0 is quite a lot. */ + expressionScale?: number; + /** Optional reference video for eyeblinks to make the eyebrow movement more natural. */ + refEyeblink?: string; + /** Optional reference video to pose the head. */ + refPose?: string; + inputYaw?: number[]; + inputPitch?: number[]; + inputRoll?: number[]; +} diff --git a/src/api/types/Scheduler.ts b/src/api/types/Scheduler.ts new file mode 100644 index 0000000..a66b4ac --- /dev/null +++ b/src/api/types/Scheduler.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type Scheduler = + | "singlestep_dpm_solver" + | "multistep_dpm_solver" + | "dpm_sde" + | "dpm_discrete" + | "dpm_discrete_ancestral" + | "unipc" + | "lms_discrete" + | "heun" + | "euler" + | "euler_ancestral" + | "pndm" + | "ddpm" + | "ddim" + | "deis"; + +export const Scheduler = { + SinglestepDpmSolver: "singlestep_dpm_solver", + MultistepDpmSolver: "multistep_dpm_solver", + DpmSde: "dpm_sde", + DpmDiscrete: "dpm_discrete", + DpmDiscreteAncestral: "dpm_discrete_ancestral", + Unipc: "unipc", + LmsDiscrete: "lms_discrete", + Heun: "heun", + Euler: "euler", + EulerAncestral: "euler_ancestral", + Pndm: "pndm", + Ddpm: "ddpm", + Ddim: "ddim", + Deis: "deis", +} as const; diff --git a/src/api/types/SearchReference.ts b/src/api/types/SearchReference.ts new file mode 100644 index 0000000..8847c91 --- /dev/null +++ b/src/api/types/SearchReference.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface SearchReference { + url: string; + title: string; + snippet: string; + score: number; +} diff --git a/src/api/types/SeoSummaryPageOutput.ts b/src/api/types/SeoSummaryPageOutput.ts new file mode 100644 index 0000000..765715f --- /dev/null +++ b/src/api/types/SeoSummaryPageOutput.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SeoSummaryPageOutput { + outputContent: string[]; + serpResults: Record; + searchUrls: string[]; + summarizedUrls: Record[]; + finalPrompt: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/SeoSummaryPageRequest.ts b/src/api/types/SeoSummaryPageRequest.ts new file mode 100644 index 0000000..e602467 --- /dev/null +++ b/src/api/types/SeoSummaryPageRequest.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SeoSummaryPageRequest { + serpSearchLocation?: Gooey.SerpSearchLocation; + /** DEPRECATED: use `serp_search_location` instead */ + scaleserpLocations?: string[]; + serpSearchType?: Gooey.SerpSearchType; + /** DEPRECATED: use `serp_search_type` instead */ + scaleserpSearchField?: string; + searchQuery: string; + keywords: string; + title: string; + companyUrl: string; + taskInstructions?: string; + enableHtml?: boolean; + selectedModel?: Gooey.SeoSummaryPageRequestSelectedModel; + samplingTemperature?: number; + maxTokens?: number; + numOutputs?: number; + quality?: number; + avoidRepetition?: boolean; + maxSearchUrls?: number; + enableCrosslinks?: boolean; + seed?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/SeoSummaryPageRequestSelectedModel.ts b/src/api/types/SeoSummaryPageRequestSelectedModel.ts new file mode 100644 index 0000000..d8026d5 --- /dev/null +++ b/src/api/types/SeoSummaryPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type SeoSummaryPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const SeoSummaryPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/SeoSummaryPageResponse.ts b/src/api/types/SeoSummaryPageResponse.ts new file mode 100644 index 0000000..2d7004e --- /dev/null +++ b/src/api/types/SeoSummaryPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SeoSummaryPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.SeoSummaryPageOutput; +} diff --git a/src/api/types/SeoSummaryPageStatusResponse.ts b/src/api/types/SeoSummaryPageStatusResponse.ts new file mode 100644 index 0000000..c34c1be --- /dev/null +++ b/src/api/types/SeoSummaryPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SeoSummaryPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.SeoSummaryPageOutput; +} diff --git a/src/api/types/SerpSearchLocation.ts b/src/api/types/SerpSearchLocation.ts new file mode 100644 index 0000000..5546e14 --- /dev/null +++ b/src/api/types/SerpSearchLocation.ts @@ -0,0 +1,489 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * An enumeration. + */ +export type SerpSearchLocation = + | "af" + | "al" + | "dz" + | "as" + | "ad" + | "ao" + | "ai" + | "aq" + | "ag" + | "ar" + | "am" + | "aw" + | "au" + | "at" + | "az" + | "bs" + | "bh" + | "bd" + | "bb" + | "by" + | "be" + | "bz" + | "bj" + | "bm" + | "bt" + | "bo" + | "ba" + | "bw" + | "bv" + | "br" + | "io" + | "bn" + | "bg" + | "bf" + | "bi" + | "kh" + | "cm" + | "ca" + | "cv" + | "ky" + | "cf" + | "td" + | "cl" + | "cn" + | "cx" + | "cc" + | "co" + | "km" + | "cg" + | "cd" + | "ck" + | "cr" + | "ci" + | "hr" + | "cu" + | "cy" + | "cz" + | "dk" + | "dj" + | "dm" + | "do" + | "ec" + | "eg" + | "sv" + | "gq" + | "er" + | "ee" + | "et" + | "fk" + | "fo" + | "fj" + | "fi" + | "fr" + | "gf" + | "pf" + | "tf" + | "ga" + | "gm" + | "ge" + | "de" + | "gh" + | "gi" + | "gr" + | "gl" + | "gd" + | "gp" + | "gu" + | "gt" + | "gn" + | "gw" + | "gy" + | "ht" + | "hm" + | "va" + | "hn" + | "hk" + | "hu" + | "is" + | "in" + | "id" + | "ir" + | "iq" + | "ie" + | "il" + | "it" + | "jm" + | "jp" + | "jo" + | "kz" + | "ke" + | "ki" + | "kp" + | "kr" + | "kw" + | "kg" + | "la" + | "lv" + | "lb" + | "ls" + | "lr" + | "ly" + | "li" + | "lt" + | "lu" + | "mo" + | "mk" + | "mg" + | "mw" + | "my" + | "mv" + | "ml" + | "mt" + | "mh" + | "mq" + | "mr" + | "mu" + | "yt" + | "mx" + | "fm" + | "md" + | "mc" + | "mn" + | "ms" + | "ma" + | "mz" + | "mm" + | "na" + | "nr" + | "np" + | "nl" + | "an" + | "nc" + | "nz" + | "ni" + | "ne" + | "ng" + | "nu" + | "nf" + | "mp" + | "no" + | "om" + | "pk" + | "pw" + | "ps" + | "pa" + | "pg" + | "py" + | "pe" + | "ph" + | "pn" + | "pl" + | "pt" + | "pr" + | "qa" + | "re" + | "ro" + | "ru" + | "rw" + | "sh" + | "kn" + | "lc" + | "pm" + | "vc" + | "ws" + | "sm" + | "st" + | "sa" + | "sn" + | "rs" + | "sc" + | "sl" + | "sg" + | "sk" + | "si" + | "sb" + | "so" + | "za" + | "gs" + | "es" + | "lk" + | "sd" + | "sr" + | "sj" + | "sz" + | "se" + | "ch" + | "sy" + | "tw" + | "tj" + | "tz" + | "th" + | "tl" + | "tg" + | "tk" + | "to" + | "tt" + | "tn" + | "tr" + | "tm" + | "tc" + | "tv" + | "ug" + | "ua" + | "ae" + | "gb" + | "us" + | "um" + | "uy" + | "uz" + | "vu" + | "ve" + | "vn" + | "vg" + | "vi" + | "wf" + | "eh" + | "ye" + | "zm" + | "zw"; + +export const SerpSearchLocation = { + Af: "af", + Al: "al", + Dz: "dz", + As: "as", + Ad: "ad", + Ao: "ao", + Ai: "ai", + Aq: "aq", + Ag: "ag", + Ar: "ar", + Am: "am", + Aw: "aw", + Au: "au", + At: "at", + Az: "az", + Bs: "bs", + Bh: "bh", + Bd: "bd", + Bb: "bb", + By: "by", + Be: "be", + Bz: "bz", + Bj: "bj", + Bm: "bm", + Bt: "bt", + Bo: "bo", + Ba: "ba", + Bw: "bw", + Bv: "bv", + Br: "br", + Io: "io", + Bn: "bn", + Bg: "bg", + Bf: "bf", + Bi: "bi", + Kh: "kh", + Cm: "cm", + Ca: "ca", + Cv: "cv", + Ky: "ky", + Cf: "cf", + Td: "td", + Cl: "cl", + Cn: "cn", + Cx: "cx", + Cc: "cc", + Co: "co", + Km: "km", + Cg: "cg", + Cd: "cd", + Ck: "ck", + Cr: "cr", + Ci: "ci", + Hr: "hr", + Cu: "cu", + Cy: "cy", + Cz: "cz", + Dk: "dk", + Dj: "dj", + Dm: "dm", + Do: "do", + Ec: "ec", + Eg: "eg", + Sv: "sv", + Gq: "gq", + Er: "er", + Ee: "ee", + Et: "et", + Fk: "fk", + Fo: "fo", + Fj: "fj", + Fi: "fi", + Fr: "fr", + Gf: "gf", + Pf: "pf", + Tf: "tf", + Ga: "ga", + Gm: "gm", + Ge: "ge", + De: "de", + Gh: "gh", + Gi: "gi", + Gr: "gr", + Gl: "gl", + Gd: "gd", + Gp: "gp", + Gu: "gu", + Gt: "gt", + Gn: "gn", + Gw: "gw", + Gy: "gy", + Ht: "ht", + Hm: "hm", + Va: "va", + Hn: "hn", + Hk: "hk", + Hu: "hu", + Is: "is", + In: "in", + Id: "id", + Ir: "ir", + Iq: "iq", + Ie: "ie", + Il: "il", + It: "it", + Jm: "jm", + Jp: "jp", + Jo: "jo", + Kz: "kz", + Ke: "ke", + Ki: "ki", + Kp: "kp", + Kr: "kr", + Kw: "kw", + Kg: "kg", + La: "la", + Lv: "lv", + Lb: "lb", + Ls: "ls", + Lr: "lr", + Ly: "ly", + Li: "li", + Lt: "lt", + Lu: "lu", + Mo: "mo", + Mk: "mk", + Mg: "mg", + Mw: "mw", + My: "my", + Mv: "mv", + Ml: "ml", + Mt: "mt", + Mh: "mh", + Mq: "mq", + Mr: "mr", + Mu: "mu", + Yt: "yt", + Mx: "mx", + Fm: "fm", + Md: "md", + Mc: "mc", + Mn: "mn", + Ms: "ms", + Ma: "ma", + Mz: "mz", + Mm: "mm", + Na: "na", + Nr: "nr", + Np: "np", + Nl: "nl", + An: "an", + Nc: "nc", + Nz: "nz", + Ni: "ni", + Ne: "ne", + Ng: "ng", + Nu: "nu", + Nf: "nf", + Mp: "mp", + No: "no", + Om: "om", + Pk: "pk", + Pw: "pw", + Ps: "ps", + Pa: "pa", + Pg: "pg", + Py: "py", + Pe: "pe", + Ph: "ph", + Pn: "pn", + Pl: "pl", + Pt: "pt", + Pr: "pr", + Qa: "qa", + Re: "re", + Ro: "ro", + Ru: "ru", + Rw: "rw", + Sh: "sh", + Kn: "kn", + Lc: "lc", + Pm: "pm", + Vc: "vc", + Ws: "ws", + Sm: "sm", + St: "st", + Sa: "sa", + Sn: "sn", + Rs: "rs", + Sc: "sc", + Sl: "sl", + Sg: "sg", + Sk: "sk", + Si: "si", + Sb: "sb", + So: "so", + Za: "za", + Gs: "gs", + Es: "es", + Lk: "lk", + Sd: "sd", + Sr: "sr", + Sj: "sj", + Sz: "sz", + Se: "se", + Ch: "ch", + Sy: "sy", + Tw: "tw", + Tj: "tj", + Tz: "tz", + Th: "th", + Tl: "tl", + Tg: "tg", + Tk: "tk", + To: "to", + Tt: "tt", + Tn: "tn", + Tr: "tr", + Tm: "tm", + Tc: "tc", + Tv: "tv", + Ug: "ug", + Ua: "ua", + Ae: "ae", + Gb: "gb", + Us: "us", + Um: "um", + Uy: "uy", + Uz: "uz", + Vu: "vu", + Ve: "ve", + Vn: "vn", + Vg: "vg", + Vi: "vi", + Wf: "wf", + Eh: "eh", + Ye: "ye", + Zm: "zm", + Zw: "zw", +} as const; diff --git a/src/api/types/SerpSearchType.ts b/src/api/types/SerpSearchType.ts new file mode 100644 index 0000000..ad1eb35 --- /dev/null +++ b/src/api/types/SerpSearchType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * An enumeration. + */ +export type SerpSearchType = "search" | "images" | "videos" | "places" | "news"; + +export const SerpSearchType = { + Search: "search", + Images: "images", + Videos: "videos", + Places: "places", + News: "news", +} as const; diff --git a/src/api/types/SmartGptPageOutput.ts b/src/api/types/SmartGptPageOutput.ts new file mode 100644 index 0000000..19569d9 --- /dev/null +++ b/src/api/types/SmartGptPageOutput.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SmartGptPageOutput { + outputText: string[]; + promptTree?: Gooey.PromptTreeNode[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/SmartGptPageRequest.ts b/src/api/types/SmartGptPageRequest.ts new file mode 100644 index 0000000..6421e52 --- /dev/null +++ b/src/api/types/SmartGptPageRequest.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SmartGptPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputPrompt: string; + cotPrompt?: string; + reflexionPrompt?: string; + deraPrompt?: string; + selectedModel?: Gooey.SmartGptPageRequestSelectedModel; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/SmartGptPageRequestSelectedModel.ts b/src/api/types/SmartGptPageRequestSelectedModel.ts new file mode 100644 index 0000000..b76967f --- /dev/null +++ b/src/api/types/SmartGptPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type SmartGptPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const SmartGptPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/SmartGptPageResponse.ts b/src/api/types/SmartGptPageResponse.ts new file mode 100644 index 0000000..c573b3d --- /dev/null +++ b/src/api/types/SmartGptPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SmartGptPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.SmartGptPageOutput; +} diff --git a/src/api/types/SmartGptPageStatusResponse.ts b/src/api/types/SmartGptPageStatusResponse.ts new file mode 100644 index 0000000..c38d1b6 --- /dev/null +++ b/src/api/types/SmartGptPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SmartGptPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.SmartGptPageOutput; +} diff --git a/src/api/types/SocialLookupEmailPageOutput.ts b/src/api/types/SocialLookupEmailPageOutput.ts new file mode 100644 index 0000000..bed1b70 --- /dev/null +++ b/src/api/types/SocialLookupEmailPageOutput.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SocialLookupEmailPageOutput { + personData: Record; + finalPrompt: string; + outputText: string[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/SocialLookupEmailPageRequest.ts b/src/api/types/SocialLookupEmailPageRequest.ts new file mode 100644 index 0000000..fc7d278 --- /dev/null +++ b/src/api/types/SocialLookupEmailPageRequest.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SocialLookupEmailPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + emailAddress: string; + inputPrompt?: string; + selectedModel?: Gooey.SocialLookupEmailPageRequestSelectedModel; + numOutputs?: number; + avoidRepetition?: boolean; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/SocialLookupEmailPageRequestSelectedModel.ts b/src/api/types/SocialLookupEmailPageRequestSelectedModel.ts new file mode 100644 index 0000000..9befe42 --- /dev/null +++ b/src/api/types/SocialLookupEmailPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type SocialLookupEmailPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const SocialLookupEmailPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/SocialLookupEmailPageResponse.ts b/src/api/types/SocialLookupEmailPageResponse.ts new file mode 100644 index 0000000..b4247eb --- /dev/null +++ b/src/api/types/SocialLookupEmailPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SocialLookupEmailPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.SocialLookupEmailPageOutput; +} diff --git a/src/api/types/SocialLookupEmailPageStatusResponse.ts b/src/api/types/SocialLookupEmailPageStatusResponse.ts new file mode 100644 index 0000000..4ff0e89 --- /dev/null +++ b/src/api/types/SocialLookupEmailPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface SocialLookupEmailPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.SocialLookupEmailPageOutput; +} diff --git a/src/api/types/StreamError.ts b/src/api/types/StreamError.ts new file mode 100644 index 0000000..31a680b --- /dev/null +++ b/src/api/types/StreamError.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface StreamError { + /** Details about the error */ + detail: string; + /** An error occurred. The stream has ended. */ + type?: string; +} diff --git a/src/api/types/Text2AudioPageOutput.ts b/src/api/types/Text2AudioPageOutput.ts new file mode 100644 index 0000000..72f2b21 --- /dev/null +++ b/src/api/types/Text2AudioPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface Text2AudioPageOutput { + outputAudios: Record; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/Text2AudioPageRequest.ts b/src/api/types/Text2AudioPageRequest.ts new file mode 100644 index 0000000..f7e1415 --- /dev/null +++ b/src/api/types/Text2AudioPageRequest.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface Text2AudioPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + textPrompt: string; + negativePrompt?: string; + durationSec?: number; + numOutputs?: number; + quality?: number; + guidanceScale?: number; + seed?: number; + sd2Upscaling?: boolean; + selectedModels?: "audio_ldm"[]; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/Text2AudioPageResponse.ts b/src/api/types/Text2AudioPageResponse.ts new file mode 100644 index 0000000..98160f2 --- /dev/null +++ b/src/api/types/Text2AudioPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface Text2AudioPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.Text2AudioPageOutput; +} diff --git a/src/api/types/Text2AudioPageStatusResponse.ts b/src/api/types/Text2AudioPageStatusResponse.ts new file mode 100644 index 0000000..9ac4fbf --- /dev/null +++ b/src/api/types/Text2AudioPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface Text2AudioPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.Text2AudioPageOutput; +} diff --git a/src/api/types/TextToSpeechPageOutput.ts b/src/api/types/TextToSpeechPageOutput.ts new file mode 100644 index 0000000..65b1200 --- /dev/null +++ b/src/api/types/TextToSpeechPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface TextToSpeechPageOutput { + audioUrl: string; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/TextToSpeechPageRequest.ts b/src/api/types/TextToSpeechPageRequest.ts new file mode 100644 index 0000000..d824937 --- /dev/null +++ b/src/api/types/TextToSpeechPageRequest.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface TextToSpeechPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + textPrompt: string; + ttsProvider?: Gooey.TextToSpeechPageRequestTtsProvider; + uberduckVoiceName?: string; + uberduckSpeakingRate?: number; + googleVoiceName?: string; + googleSpeakingRate?: number; + googlePitch?: number; + barkHistoryPrompt?: string; + /** Use `elevenlabs_voice_id` instead */ + elevenlabsVoiceName?: string; + elevenlabsApiKey?: string; + elevenlabsVoiceId?: string; + elevenlabsModel?: string; + elevenlabsStability?: number; + elevenlabsSimilarityBoost?: number; + elevenlabsStyle?: number; + elevenlabsSpeakerBoost?: boolean; + azureVoiceName?: string; + openaiVoiceName?: Gooey.TextToSpeechPageRequestOpenaiVoiceName; + openaiTtsModel?: Gooey.TextToSpeechPageRequestOpenaiTtsModel; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/TextToSpeechPageRequestOpenaiTtsModel.ts b/src/api/types/TextToSpeechPageRequestOpenaiTtsModel.ts new file mode 100644 index 0000000..f775470 --- /dev/null +++ b/src/api/types/TextToSpeechPageRequestOpenaiTtsModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type TextToSpeechPageRequestOpenaiTtsModel = "tts_1" | "tts_1_hd"; + +export const TextToSpeechPageRequestOpenaiTtsModel = { + Tts1: "tts_1", + Tts1Hd: "tts_1_hd", +} as const; diff --git a/src/api/types/TextToSpeechPageRequestOpenaiVoiceName.ts b/src/api/types/TextToSpeechPageRequestOpenaiVoiceName.ts new file mode 100644 index 0000000..05af736 --- /dev/null +++ b/src/api/types/TextToSpeechPageRequestOpenaiVoiceName.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type TextToSpeechPageRequestOpenaiVoiceName = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; + +export const TextToSpeechPageRequestOpenaiVoiceName = { + Alloy: "alloy", + Echo: "echo", + Fable: "fable", + Onyx: "onyx", + Nova: "nova", + Shimmer: "shimmer", +} as const; diff --git a/src/api/types/TextToSpeechPageRequestTtsProvider.ts b/src/api/types/TextToSpeechPageRequestTtsProvider.ts new file mode 100644 index 0000000..0629bac --- /dev/null +++ b/src/api/types/TextToSpeechPageRequestTtsProvider.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type TextToSpeechPageRequestTtsProvider = + | "GOOGLE_TTS" + | "ELEVEN_LABS" + | "UBERDUCK" + | "BARK" + | "AZURE_TTS" + | "OPEN_AI"; + +export const TextToSpeechPageRequestTtsProvider = { + GoogleTts: "GOOGLE_TTS", + ElevenLabs: "ELEVEN_LABS", + Uberduck: "UBERDUCK", + Bark: "BARK", + AzureTts: "AZURE_TTS", + OpenAi: "OPEN_AI", +} as const; diff --git a/src/api/types/TextToSpeechPageResponse.ts b/src/api/types/TextToSpeechPageResponse.ts new file mode 100644 index 0000000..535cb12 --- /dev/null +++ b/src/api/types/TextToSpeechPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface TextToSpeechPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.TextToSpeechPageOutput; +} diff --git a/src/api/types/TextToSpeechPageStatusResponse.ts b/src/api/types/TextToSpeechPageStatusResponse.ts new file mode 100644 index 0000000..c9b2d92 --- /dev/null +++ b/src/api/types/TextToSpeechPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface TextToSpeechPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.TextToSpeechPageOutput; +} diff --git a/src/api/types/TrainingDataModel.ts b/src/api/types/TrainingDataModel.ts new file mode 100644 index 0000000..c3b93e9 --- /dev/null +++ b/src/api/types/TrainingDataModel.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface TrainingDataModel { + prompt: string; + completion: string; +} diff --git a/src/api/types/TranslationPageOutput.ts b/src/api/types/TranslationPageOutput.ts new file mode 100644 index 0000000..f0286bd --- /dev/null +++ b/src/api/types/TranslationPageOutput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface TranslationPageOutput { + outputTexts?: string[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/TranslationPageRequest.ts b/src/api/types/TranslationPageRequest.ts new file mode 100644 index 0000000..a21002c --- /dev/null +++ b/src/api/types/TranslationPageRequest.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface TranslationPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + texts?: string[]; + selectedModel?: Gooey.TranslationPageRequestSelectedModel; + translationSource?: string; + translationTarget?: string; + /** + * Provide a glossary to customize translation and improve accuracy of domain-specific terms. + * If not specified or invalid, no glossary will be used. Read about the expected format [here](https://docs.google.com/document/d/1TwzAvFmFYekloRKql2PXNPIyqCbsHRL8ZtnWkzAYrh8/edit?usp=sharing). + */ + glossaryDocument?: string; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/TranslationPageRequestSelectedModel.ts b/src/api/types/TranslationPageRequestSelectedModel.ts new file mode 100644 index 0000000..2d13368 --- /dev/null +++ b/src/api/types/TranslationPageRequestSelectedModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type TranslationPageRequestSelectedModel = "google" | "ghana_nlp"; + +export const TranslationPageRequestSelectedModel = { + Google: "google", + GhanaNlp: "ghana_nlp", +} as const; diff --git a/src/api/types/TranslationPageResponse.ts b/src/api/types/TranslationPageResponse.ts new file mode 100644 index 0000000..4fac26a --- /dev/null +++ b/src/api/types/TranslationPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface TranslationPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.TranslationPageOutput; +} diff --git a/src/api/types/TranslationPageStatusResponse.ts b/src/api/types/TranslationPageStatusResponse.ts new file mode 100644 index 0000000..93cc67d --- /dev/null +++ b/src/api/types/TranslationPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface TranslationPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.TranslationPageOutput; +} diff --git a/src/api/types/Trigger.ts b/src/api/types/Trigger.ts new file mode 100644 index 0000000..ad5cc90 --- /dev/null +++ b/src/api/types/Trigger.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * When to run this function. `pre` runs before the recipe, `post` runs after the recipe. + */ +export type Trigger = "pre" | "post"; + +export const Trigger = { + Pre: "pre", + Post: "post", +} as const; diff --git a/src/api/types/ValidationError.ts b/src/api/types/ValidationError.ts new file mode 100644 index 0000000..0bd3cdb --- /dev/null +++ b/src/api/types/ValidationError.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface ValidationError { + loc: Gooey.ValidationErrorLocItem[]; + msg: string; + type: string; +} diff --git a/src/api/types/ValidationErrorLocItem.ts b/src/api/types/ValidationErrorLocItem.ts new file mode 100644 index 0000000..c97f7db --- /dev/null +++ b/src/api/types/ValidationErrorLocItem.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ValidationErrorLocItem = string | number; diff --git a/src/api/types/Vcard.ts b/src/api/types/Vcard.ts new file mode 100644 index 0000000..b98ed0a --- /dev/null +++ b/src/api/types/Vcard.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface Vcard { + formatName: string; + email?: string; + gender?: string; + birthdayYear?: number; + birthdayMonth?: number; + birthdayDay?: number; + familyName?: string; + givenName?: string; + middleNames?: string; + honorificPrefixes?: string; + honorificSuffixes?: string; + impp?: string; + address?: string; + calendarUrl?: string; + commaSeparatedCategories?: string; + kind?: string; + language?: string; + organization?: string; + photoUrl?: string; + logoUrl?: string; + role?: string; + timezone?: string; + jobTitle?: string; + urls?: string[]; + tel?: string; + note?: string; +} diff --git a/src/api/types/VideoBotsPageOutput.ts b/src/api/types/VideoBotsPageOutput.ts new file mode 100644 index 0000000..b5e0d56 --- /dev/null +++ b/src/api/types/VideoBotsPageOutput.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface VideoBotsPageOutput { + finalPrompt?: Gooey.VideoBotsPageOutputFinalPrompt; + outputText?: string[]; + outputAudio?: string[]; + outputVideo?: string[]; + rawInputText?: string; + rawTtsText?: string[]; + rawOutputText?: string[]; + references?: Gooey.SearchReference[]; + finalSearchQuery?: string; + finalKeywordQuery?: Gooey.VideoBotsPageOutputFinalKeywordQuery; + outputDocuments?: string[]; + replyButtons?: Gooey.ReplyButton[]; + finishReason?: string[]; + calledFunctions?: Gooey.CalledFunctionResponse[]; +} diff --git a/src/api/types/VideoBotsPageOutputFinalKeywordQuery.ts b/src/api/types/VideoBotsPageOutputFinalKeywordQuery.ts new file mode 100644 index 0000000..8bfafae --- /dev/null +++ b/src/api/types/VideoBotsPageOutputFinalKeywordQuery.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageOutputFinalKeywordQuery = string | string[]; diff --git a/src/api/types/VideoBotsPageOutputFinalPrompt.ts b/src/api/types/VideoBotsPageOutputFinalPrompt.ts new file mode 100644 index 0000000..adae2a3 --- /dev/null +++ b/src/api/types/VideoBotsPageOutputFinalPrompt.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export type VideoBotsPageOutputFinalPrompt = string | Gooey.ConversationEntry[]; diff --git a/src/api/types/VideoBotsPageRequest.ts b/src/api/types/VideoBotsPageRequest.ts new file mode 100644 index 0000000..f4e3a84 --- /dev/null +++ b/src/api/types/VideoBotsPageRequest.ts @@ -0,0 +1,82 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface VideoBotsPageRequest { + functions?: Gooey.RecipeFunction[]; + /** Variables to be used as Jinja prompt templates and in functions as arguments */ + variables?: Record; + inputPrompt?: string; + inputAudio?: string; + inputImages?: string[]; + inputDocuments?: string[]; + /** Select a workflow to extract text from documents and images. */ + docExtractUrl?: string; + messages?: Gooey.ConversationEntry[]; + botScript?: string; + selectedModel?: Gooey.VideoBotsPageRequestSelectedModel; + /** When your copilot users upload a photo or pdf, what kind of document are they mostly likely to upload? (via [Azure](https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/how-to-guides/use-sdk-rest-api?view=doc-intel-3.1.0&tabs=linux&pivots=programming-language-rest-api)) */ + documentModel?: string; + avoidRepetition?: boolean; + numOutputs?: number; + quality?: number; + maxTokens?: number; + samplingTemperature?: number; + taskInstructions?: string; + queryInstructions?: string; + keywordInstructions?: string; + documents?: string[]; + maxReferences?: number; + maxContextWords?: number; + scrollJump?: number; + embeddingModel?: Gooey.VideoBotsPageRequestEmbeddingModel; + /** + * Weightage for dense vs sparse embeddings. `0` for sparse, `1` for dense, `0.5` for equal weight. + * Generally speaking, dense embeddings excel at understanding the context of the query, whereas sparse vectors excel at keyword matches. + */ + denseWeight?: number; + citationStyle?: Gooey.VideoBotsPageRequestCitationStyle; + useUrlShortener?: boolean; + /** Choose a model to transcribe incoming audio messages to text. */ + asrModel?: Gooey.VideoBotsPageRequestAsrModel; + /** Choose a language to transcribe incoming audio messages to text. */ + asrLanguage?: string; + translationModel?: Gooey.VideoBotsPageRequestTranslationModel; + /** Choose a language to translate incoming text & audio messages to English and responses back to your selected language. Useful for low-resource languages. */ + userLanguage?: string; + /** Translation Glossary for User Langauge -> LLM Language (English) */ + inputGlossaryDocument?: string; + /** Translation Glossary for LLM Language (English) -> User Langauge */ + outputGlossaryDocument?: string; + lipsyncModel?: Gooey.VideoBotsPageRequestLipsyncModel; + /** Give your copilot superpowers by giving it access to tools. Powered by [Function calling](https://platform.openai.com/docs/guides/function-calling). */ + tools?: Gooey.LlmTools[]; + ttsProvider?: Gooey.VideoBotsPageRequestTtsProvider; + uberduckVoiceName?: string; + uberduckSpeakingRate?: number; + googleVoiceName?: string; + googleSpeakingRate?: number; + googlePitch?: number; + barkHistoryPrompt?: string; + /** Use `elevenlabs_voice_id` instead */ + elevenlabsVoiceName?: string; + elevenlabsApiKey?: string; + elevenlabsVoiceId?: string; + elevenlabsModel?: string; + elevenlabsStability?: number; + elevenlabsSimilarityBoost?: number; + elevenlabsStyle?: number; + elevenlabsSpeakerBoost?: boolean; + azureVoiceName?: string; + openaiVoiceName?: Gooey.VideoBotsPageRequestOpenaiVoiceName; + openaiTtsModel?: Gooey.VideoBotsPageRequestOpenaiTtsModel; + inputFace?: string; + facePaddingTop?: number; + facePaddingBottom?: number; + facePaddingLeft?: number; + facePaddingRight?: number; + sadtalkerSettings?: Gooey.SadTalkerSettings; + settings?: Gooey.RunSettings; +} diff --git a/src/api/types/VideoBotsPageRequestAsrModel.ts b/src/api/types/VideoBotsPageRequestAsrModel.ts new file mode 100644 index 0000000..3c4537e --- /dev/null +++ b/src/api/types/VideoBotsPageRequestAsrModel.ts @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Choose a model to transcribe incoming audio messages to text. + */ +export type VideoBotsPageRequestAsrModel = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; + +export const VideoBotsPageRequestAsrModel = { + WhisperLargeV2: "whisper_large_v2", + WhisperLargeV3: "whisper_large_v3", + WhisperHindiLargeV2: "whisper_hindi_large_v2", + WhisperTeluguLargeV2: "whisper_telugu_large_v2", + NemoEnglish: "nemo_english", + NemoHindi: "nemo_hindi", + VakyanshBhojpuri: "vakyansh_bhojpuri", + GcpV1: "gcp_v1", + Usm: "usm", + Deepgram: "deepgram", + Azure: "azure", + SeamlessM4T: "seamless_m4t", + Mms1BAll: "mms_1b_all", +} as const; diff --git a/src/api/types/VideoBotsPageRequestCitationStyle.ts b/src/api/types/VideoBotsPageRequestCitationStyle.ts new file mode 100644 index 0000000..58a7d44 --- /dev/null +++ b/src/api/types/VideoBotsPageRequestCitationStyle.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageRequestCitationStyle = + | "number" + | "title" + | "url" + | "symbol" + | "markdown" + | "html" + | "slack_mrkdwn" + | "plaintext" + | "number_markdown" + | "number_html" + | "number_slack_mrkdwn" + | "number_plaintext" + | "symbol_markdown" + | "symbol_html" + | "symbol_slack_mrkdwn" + | "symbol_plaintext"; + +export const VideoBotsPageRequestCitationStyle = { + Number: "number", + Title: "title", + Url: "url", + Symbol: "symbol", + Markdown: "markdown", + Html: "html", + SlackMrkdwn: "slack_mrkdwn", + Plaintext: "plaintext", + NumberMarkdown: "number_markdown", + NumberHtml: "number_html", + NumberSlackMrkdwn: "number_slack_mrkdwn", + NumberPlaintext: "number_plaintext", + SymbolMarkdown: "symbol_markdown", + SymbolHtml: "symbol_html", + SymbolSlackMrkdwn: "symbol_slack_mrkdwn", + SymbolPlaintext: "symbol_plaintext", +} as const; diff --git a/src/api/types/VideoBotsPageRequestEmbeddingModel.ts b/src/api/types/VideoBotsPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..9250afd --- /dev/null +++ b/src/api/types/VideoBotsPageRequestEmbeddingModel.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageRequestEmbeddingModel = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; + +export const VideoBotsPageRequestEmbeddingModel = { + Openai3Large: "openai_3_large", + Openai3Small: "openai_3_small", + OpenaiAda2: "openai_ada_2", + E5LargeV2: "e5_large_v2", + E5BaseV2: "e5_base_v2", + MultilingualE5Base: "multilingual_e5_base", + MultilingualE5Large: "multilingual_e5_large", + GteLarge: "gte_large", + GteBase: "gte_base", +} as const; diff --git a/src/api/types/VideoBotsPageRequestLipsyncModel.ts b/src/api/types/VideoBotsPageRequestLipsyncModel.ts new file mode 100644 index 0000000..cc626d0 --- /dev/null +++ b/src/api/types/VideoBotsPageRequestLipsyncModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageRequestLipsyncModel = "Wav2Lip" | "SadTalker"; + +export const VideoBotsPageRequestLipsyncModel = { + Wav2Lip: "Wav2Lip", + SadTalker: "SadTalker", +} as const; diff --git a/src/api/types/VideoBotsPageRequestOpenaiTtsModel.ts b/src/api/types/VideoBotsPageRequestOpenaiTtsModel.ts new file mode 100644 index 0000000..f35f452 --- /dev/null +++ b/src/api/types/VideoBotsPageRequestOpenaiTtsModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageRequestOpenaiTtsModel = "tts_1" | "tts_1_hd"; + +export const VideoBotsPageRequestOpenaiTtsModel = { + Tts1: "tts_1", + Tts1Hd: "tts_1_hd", +} as const; diff --git a/src/api/types/VideoBotsPageRequestOpenaiVoiceName.ts b/src/api/types/VideoBotsPageRequestOpenaiVoiceName.ts new file mode 100644 index 0000000..197ce47 --- /dev/null +++ b/src/api/types/VideoBotsPageRequestOpenaiVoiceName.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageRequestOpenaiVoiceName = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; + +export const VideoBotsPageRequestOpenaiVoiceName = { + Alloy: "alloy", + Echo: "echo", + Fable: "fable", + Onyx: "onyx", + Nova: "nova", + Shimmer: "shimmer", +} as const; diff --git a/src/api/types/VideoBotsPageRequestSelectedModel.ts b/src/api/types/VideoBotsPageRequestSelectedModel.ts new file mode 100644 index 0000000..e923a1d --- /dev/null +++ b/src/api/types/VideoBotsPageRequestSelectedModel.ts @@ -0,0 +1,68 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageRequestSelectedModel = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; + +export const VideoBotsPageRequestSelectedModel = { + Gpt4O: "gpt_4_o", + Gpt4TurboVision: "gpt_4_turbo_vision", + Gpt4Vision: "gpt_4_vision", + Gpt4Turbo: "gpt_4_turbo", + Gpt4: "gpt_4", + Gpt432K: "gpt_4_32k", + Gpt35Turbo: "gpt_3_5_turbo", + Gpt35Turbo16K: "gpt_3_5_turbo_16k", + Gpt35TurboInstruct: "gpt_3_5_turbo_instruct", + Llama370B: "llama3_70b", + Llama38B: "llama3_8b", + Llama270BChat: "llama2_70b_chat", + Mixtral8X7BInstruct01: "mixtral_8x7b_instruct_0_1", + Gemma7BIt: "gemma_7b_it", + Gemini15Pro: "gemini_1_5_pro", + Gemini1ProVision: "gemini_1_pro_vision", + Gemini1Pro: "gemini_1_pro", + Palm2Chat: "palm2_chat", + Palm2Text: "palm2_text", + Claude35Sonnet: "claude_3_5_sonnet", + Claude3Opus: "claude_3_opus", + Claude3Sonnet: "claude_3_sonnet", + Claude3Haiku: "claude_3_haiku", + SeaLion7BInstruct: "sea_lion_7b_instruct", + TextDavinci003: "text_davinci_003", + TextDavinci002: "text_davinci_002", + CodeDavinci002: "code_davinci_002", + TextCurie001: "text_curie_001", + TextBabbage001: "text_babbage_001", + TextAda001: "text_ada_001", +} as const; diff --git a/src/api/types/VideoBotsPageRequestTranslationModel.ts b/src/api/types/VideoBotsPageRequestTranslationModel.ts new file mode 100644 index 0000000..36fd5c6 --- /dev/null +++ b/src/api/types/VideoBotsPageRequestTranslationModel.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageRequestTranslationModel = "google" | "ghana_nlp"; + +export const VideoBotsPageRequestTranslationModel = { + Google: "google", + GhanaNlp: "ghana_nlp", +} as const; diff --git a/src/api/types/VideoBotsPageRequestTtsProvider.ts b/src/api/types/VideoBotsPageRequestTtsProvider.ts new file mode 100644 index 0000000..317bf7d --- /dev/null +++ b/src/api/types/VideoBotsPageRequestTtsProvider.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type VideoBotsPageRequestTtsProvider = + | "GOOGLE_TTS" + | "ELEVEN_LABS" + | "UBERDUCK" + | "BARK" + | "AZURE_TTS" + | "OPEN_AI"; + +export const VideoBotsPageRequestTtsProvider = { + GoogleTts: "GOOGLE_TTS", + ElevenLabs: "ELEVEN_LABS", + Uberduck: "UBERDUCK", + Bark: "BARK", + AzureTts: "AZURE_TTS", + OpenAi: "OPEN_AI", +} as const; diff --git a/src/api/types/VideoBotsPageResponse.ts b/src/api/types/VideoBotsPageResponse.ts new file mode 100644 index 0000000..7c061ec --- /dev/null +++ b/src/api/types/VideoBotsPageResponse.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface VideoBotsPageResponse { + /** Unique ID for this run */ + id: string; + /** Web URL for this run */ + url: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Output of the run */ + output: Gooey.VideoBotsPageOutput; +} diff --git a/src/api/types/VideoBotsPageStatusResponse.ts b/src/api/types/VideoBotsPageStatusResponse.ts new file mode 100644 index 0000000..a655b88 --- /dev/null +++ b/src/api/types/VideoBotsPageStatusResponse.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Gooey from "../index"; + +export interface VideoBotsPageStatusResponse { + /** Unique ID for this run */ + runId: string; + /** Web URL for this run */ + webUrl: string; + /** Time when the run was created as ISO format */ + createdAt: string; + /** Total run time in seconds */ + runTimeSec: number; + /** Status of the run */ + status: Gooey.RecipeRunState; + /** Details about the status of the run as a human readable string */ + detail: string; + /** Output of the run. Only available if status is `"completed"` */ + output?: Gooey.VideoBotsPageOutput; +} diff --git a/src/api/types/index.ts b/src/api/types/index.ts new file mode 100644 index 0000000..078fa81 --- /dev/null +++ b/src/api/types/index.ts @@ -0,0 +1,250 @@ +export * from "./Function"; +export * from "./AggFunction"; +export * from "./AggFunctionResult"; +export * from "./AsrChunk"; +export * from "./AsrOutputJson"; +export * from "./AsrPageOutputOutputTextItem"; +export * from "./AsrPageOutput"; +export * from "./AsrPageRequestSelectedModel"; +export * from "./AsrPageRequestTranslationModel"; +export * from "./AsrPageRequestOutputFormat"; +export * from "./AsrPageRequest"; +export * from "./AsrPageResponse"; +export * from "./AsrPageStatusResponse"; +export * from "./AsyncApiResponseModelV3"; +export * from "./BalanceResponse"; +export * from "./BotBroadcastFilters"; +export * from "./BulkEvalPageOutput"; +export * from "./BulkEvalPageRequestSelectedModel"; +export * from "./BulkEvalPageRequest"; +export * from "./BulkEvalPageResponse"; +export * from "./BulkEvalPageStatusResponse"; +export * from "./BulkRunnerPageOutput"; +export * from "./BulkRunnerPageRequest"; +export * from "./BulkRunnerPageResponse"; +export * from "./BulkRunnerPageStatusResponse"; +export * from "./ButtonPressed"; +export * from "./Trigger"; +export * from "./CalledFunctionResponse"; +export * from "./ChatCompletionContentPartImageParam"; +export * from "./ChatCompletionContentPartTextParam"; +export * from "./ChyronPlantPageOutput"; +export * from "./ChyronPlantPageRequest"; +export * from "./ChyronPlantPageResponse"; +export * from "./ChyronPlantPageStatusResponse"; +export * from "./CompareLlmPageOutput"; +export * from "./CompareLlmPageRequestSelectedModelsItem"; +export * from "./CompareLlmPageRequestResponseFormatType"; +export * from "./CompareLlmPageRequest"; +export * from "./CompareLlmPageResponse"; +export * from "./CompareLlmPageStatusResponse"; +export * from "./CompareText2ImgPageOutput"; +export * from "./CompareText2ImgPageRequestSelectedModelsItem"; +export * from "./Scheduler"; +export * from "./CompareText2ImgPageRequest"; +export * from "./CompareText2ImgPageResponse"; +export * from "./CompareText2ImgPageStatusResponse"; +export * from "./CompareUpscalerPageOutput"; +export * from "./CompareUpscalerPageRequestSelectedModelsItem"; +export * from "./CompareUpscalerPageRequest"; +export * from "./CompareUpscalerPageResponse"; +export * from "./CompareUpscalerPageStatusResponse"; +export * from "./Level"; +export * from "./ConsoleLogs"; +export * from "./Role"; +export * from "./ConversationEntryContentItem"; +export * from "./Content"; +export * from "./ConversationEntry"; +export * from "./ConversationStart"; +export * from "./CreateStreamResponse"; +export * from "./DeforumSdPageOutput"; +export * from "./DeforumSdPageRequestSelectedModel"; +export * from "./DeforumSdPageRequest"; +export * from "./DeforumSdPageResponse"; +export * from "./DeforumSdPageStatusResponse"; +export * from "./DocExtractPageOutput"; +export * from "./DocExtractPageRequestSelectedAsrModel"; +export * from "./DocExtractPageRequestSelectedModel"; +export * from "./DocExtractPageRequest"; +export * from "./DocExtractPageResponse"; +export * from "./DocExtractPageStatusResponse"; +export * from "./DocSearchPageOutput"; +export * from "./DocSearchPageRequestKeywordQuery"; +export * from "./DocSearchPageRequestEmbeddingModel"; +export * from "./DocSearchPageRequestSelectedModel"; +export * from "./DocSearchPageRequestCitationStyle"; +export * from "./DocSearchPageRequest"; +export * from "./DocSearchPageResponse"; +export * from "./DocSearchPageStatusResponse"; +export * from "./DocSummaryPageOutput"; +export * from "./DocSummaryPageRequestSelectedModel"; +export * from "./DocSummaryPageRequestSelectedAsrModel"; +export * from "./DocSummaryPageRequest"; +export * from "./DocSummaryPageResponse"; +export * from "./DocSummaryPageStatusResponse"; +export * from "./EmailFaceInpaintingPageOutput"; +export * from "./EmailFaceInpaintingPageRequestSelectedModel"; +export * from "./EmailFaceInpaintingPageRequest"; +export * from "./EmailFaceInpaintingPageResponse"; +export * from "./EmailFaceInpaintingPageStatusResponse"; +export * from "./EmbeddingsPageOutput"; +export * from "./EmbeddingsPageRequestSelectedModel"; +export * from "./EmbeddingsPageRequest"; +export * from "./EmbeddingsPageResponse"; +export * from "./EmbeddingsPageStatusResponse"; +export * from "./EvalPrompt"; +export * from "./FaceInpaintingPageOutput"; +export * from "./FaceInpaintingPageRequestSelectedModel"; +export * from "./FaceInpaintingPageRequest"; +export * from "./FaceInpaintingPageResponse"; +export * from "./FaceInpaintingPageStatusResponse"; +export * from "./FailedReponseModelV2"; +export * from "./FailedResponseDetail"; +export * from "./FinalResponse"; +export * from "./FunctionsPageOutput"; +export * from "./FunctionsPageRequest"; +export * from "./FunctionsPageResponse"; +export * from "./FunctionsPageStatusResponse"; +export * from "./GenericErrorResponse"; +export * from "./GenericErrorResponseDetail"; +export * from "./GoogleGptPageOutput"; +export * from "./GoogleGptPageRequestSelectedModel"; +export * from "./GoogleGptPageRequestEmbeddingModel"; +export * from "./GoogleGptPageRequest"; +export * from "./GoogleGptPageResponse"; +export * from "./GoogleGptPageStatusResponse"; +export * from "./GoogleImageGenPageOutput"; +export * from "./GoogleImageGenPageRequestSelectedModel"; +export * from "./GoogleImageGenPageRequest"; +export * from "./GoogleImageGenPageResponse"; +export * from "./GoogleImageGenPageStatusResponse"; +export * from "./HttpValidationError"; +export * from "./ImageSegmentationPageOutput"; +export * from "./ImageSegmentationPageRequestSelectedModel"; +export * from "./ImageSegmentationPageRequest"; +export * from "./ImageSegmentationPageResponse"; +export * from "./ImageSegmentationPageStatusResponse"; +export * from "./Detail"; +export * from "./ImageUrl"; +export * from "./Img2ImgPageOutput"; +export * from "./Img2ImgPageRequestSelectedModel"; +export * from "./Img2ImgPageRequestSelectedControlnetModelItem"; +export * from "./Img2ImgPageRequestSelectedControlnetModel"; +export * from "./Img2ImgPageRequest"; +export * from "./Img2ImgPageResponse"; +export * from "./Img2ImgPageStatusResponse"; +export * from "./LlmTools"; +export * from "./LetterWriterPageOutput"; +export * from "./LetterWriterPageRequest"; +export * from "./LetterWriterPageResponse"; +export * from "./LetterWriterPageStatusResponse"; +export * from "./LipsyncPageOutput"; +export * from "./LipsyncPageRequestSelectedModel"; +export * from "./LipsyncPageRequest"; +export * from "./LipsyncPageResponse"; +export * from "./LipsyncPageStatusResponse"; +export * from "./LipsyncTtsPageOutput"; +export * from "./LipsyncTtsPageRequestTtsProvider"; +export * from "./LipsyncTtsPageRequestOpenaiVoiceName"; +export * from "./LipsyncTtsPageRequestOpenaiTtsModel"; +export * from "./LipsyncTtsPageRequestSelectedModel"; +export * from "./LipsyncTtsPageRequest"; +export * from "./LipsyncTtsPageResponse"; +export * from "./LipsyncTtsPageStatusResponse"; +export * from "./MessagePart"; +export * from "./ObjectInpaintingPageOutput"; +export * from "./ObjectInpaintingPageRequestSelectedModel"; +export * from "./ObjectInpaintingPageRequest"; +export * from "./ObjectInpaintingPageResponse"; +export * from "./ObjectInpaintingPageStatusResponse"; +export * from "./Prompt"; +export * from "./PromptTreeNode"; +export * from "./QrCodeGeneratorPageOutput"; +export * from "./QrCodeGeneratorPageRequestImagePromptControlnetModelsItem"; +export * from "./QrCodeGeneratorPageRequestSelectedModel"; +export * from "./QrCodeGeneratorPageRequestSelectedControlnetModelItem"; +export * from "./QrCodeGeneratorPageRequest"; +export * from "./QrCodeGeneratorPageResponse"; +export * from "./QrCodeGeneratorPageStatusResponse"; +export * from "./RecipeFunction"; +export * from "./RecipeRunState"; +export * from "./RelatedDocSearchResponse"; +export * from "./RelatedGoogleGptResponse"; +export * from "./RelatedQnADocPageOutput"; +export * from "./RelatedQnADocPageRequestKeywordQuery"; +export * from "./RelatedQnADocPageRequestEmbeddingModel"; +export * from "./RelatedQnADocPageRequestSelectedModel"; +export * from "./RelatedQnADocPageRequestCitationStyle"; +export * from "./RelatedQnADocPageRequest"; +export * from "./RelatedQnADocPageResponse"; +export * from "./RelatedQnADocPageStatusResponse"; +export * from "./RelatedQnAPageOutput"; +export * from "./RelatedQnAPageRequestSelectedModel"; +export * from "./RelatedQnAPageRequestEmbeddingModel"; +export * from "./RelatedQnAPageRequest"; +export * from "./RelatedQnAPageResponse"; +export * from "./RelatedQnAPageStatusResponse"; +export * from "./ReplyButton"; +export * from "./ResponseModelFinalPrompt"; +export * from "./ResponseModelFinalKeywordQuery"; +export * from "./ResponseModel"; +export * from "./RunSettingsRetentionPolicy"; +export * from "./RunSettings"; +export * from "./RunStart"; +export * from "./SeoSummaryPageOutput"; +export * from "./SeoSummaryPageRequestSelectedModel"; +export * from "./SeoSummaryPageRequest"; +export * from "./SeoSummaryPageResponse"; +export * from "./SeoSummaryPageStatusResponse"; +export * from "./Preprocess"; +export * from "./SadTalkerSettings"; +export * from "./SearchReference"; +export * from "./SerpSearchLocation"; +export * from "./SerpSearchType"; +export * from "./SmartGptPageOutput"; +export * from "./SmartGptPageRequestSelectedModel"; +export * from "./SmartGptPageRequest"; +export * from "./SmartGptPageResponse"; +export * from "./SmartGptPageStatusResponse"; +export * from "./SocialLookupEmailPageOutput"; +export * from "./SocialLookupEmailPageRequestSelectedModel"; +export * from "./SocialLookupEmailPageRequest"; +export * from "./SocialLookupEmailPageResponse"; +export * from "./SocialLookupEmailPageStatusResponse"; +export * from "./StreamError"; +export * from "./Text2AudioPageOutput"; +export * from "./Text2AudioPageRequest"; +export * from "./Text2AudioPageResponse"; +export * from "./Text2AudioPageStatusResponse"; +export * from "./TextToSpeechPageOutput"; +export * from "./TextToSpeechPageRequestTtsProvider"; +export * from "./TextToSpeechPageRequestOpenaiVoiceName"; +export * from "./TextToSpeechPageRequestOpenaiTtsModel"; +export * from "./TextToSpeechPageRequest"; +export * from "./TextToSpeechPageResponse"; +export * from "./TextToSpeechPageStatusResponse"; +export * from "./TrainingDataModel"; +export * from "./TranslationPageOutput"; +export * from "./TranslationPageRequestSelectedModel"; +export * from "./TranslationPageRequest"; +export * from "./TranslationPageResponse"; +export * from "./TranslationPageStatusResponse"; +export * from "./Vcard"; +export * from "./ValidationErrorLocItem"; +export * from "./ValidationError"; +export * from "./VideoBotsPageOutputFinalPrompt"; +export * from "./VideoBotsPageOutputFinalKeywordQuery"; +export * from "./VideoBotsPageOutput"; +export * from "./VideoBotsPageRequestSelectedModel"; +export * from "./VideoBotsPageRequestEmbeddingModel"; +export * from "./VideoBotsPageRequestCitationStyle"; +export * from "./VideoBotsPageRequestAsrModel"; +export * from "./VideoBotsPageRequestTranslationModel"; +export * from "./VideoBotsPageRequestLipsyncModel"; +export * from "./VideoBotsPageRequestTtsProvider"; +export * from "./VideoBotsPageRequestOpenaiVoiceName"; +export * from "./VideoBotsPageRequestOpenaiTtsModel"; +export * from "./VideoBotsPageRequest"; +export * from "./VideoBotsPageResponse"; +export * from "./VideoBotsPageStatusResponse"; +export * from "./AnimationPrompt"; diff --git a/src/core/auth/BasicAuth.ts b/src/core/auth/BasicAuth.ts new file mode 100644 index 0000000..146df21 --- /dev/null +++ b/src/core/auth/BasicAuth.ts @@ -0,0 +1,31 @@ +import { Base64 } from "js-base64"; + +export interface BasicAuth { + username: string; + password: string; +} + +const BASIC_AUTH_HEADER_PREFIX = /^Basic /i; + +export const BasicAuth = { + toAuthorizationHeader: (basicAuth: BasicAuth | undefined): string | undefined => { + if (basicAuth == null) { + return undefined; + } + const token = Base64.encode(`${basicAuth.username}:${basicAuth.password}`); + return `Basic ${token}`; + }, + fromAuthorizationHeader: (header: string): BasicAuth => { + const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, ""); + const decoded = Base64.decode(credentials); + const [username, password] = decoded.split(":", 2); + + if (username == null || password == null) { + throw new Error("Invalid basic auth"); + } + return { + username, + password, + }; + }, +}; diff --git a/src/core/auth/BearerToken.ts b/src/core/auth/BearerToken.ts new file mode 100644 index 0000000..fe987fc --- /dev/null +++ b/src/core/auth/BearerToken.ts @@ -0,0 +1,15 @@ +export type BearerToken = string; + +const BEARER_AUTH_HEADER_PREFIX = /^Bearer /i; + +export const BearerToken = { + toAuthorizationHeader: (token: BearerToken | undefined): string | undefined => { + if (token == null) { + return undefined; + } + return `Bearer ${token}`; + }, + fromAuthorizationHeader: (header: string): BearerToken => { + return header.replace(BEARER_AUTH_HEADER_PREFIX, "").trim() as BearerToken; + }, +}; diff --git a/src/core/auth/index.ts b/src/core/auth/index.ts new file mode 100644 index 0000000..ee293b3 --- /dev/null +++ b/src/core/auth/index.ts @@ -0,0 +1,2 @@ +export { BasicAuth } from "./BasicAuth"; +export { BearerToken } from "./BearerToken"; diff --git a/src/core/fetcher/APIResponse.ts b/src/core/fetcher/APIResponse.ts new file mode 100644 index 0000000..3664d09 --- /dev/null +++ b/src/core/fetcher/APIResponse.ts @@ -0,0 +1,12 @@ +export type APIResponse = SuccessfulResponse | FailedResponse; + +export interface SuccessfulResponse { + ok: true; + body: T; + headers?: Record; +} + +export interface FailedResponse { + ok: false; + error: T; +} diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts new file mode 100644 index 0000000..02af7dc --- /dev/null +++ b/src/core/fetcher/Fetcher.ts @@ -0,0 +1,147 @@ +import { APIResponse } from "./APIResponse"; +import { createRequestUrl } from "./createRequestUrl"; +import { getFetchFn } from "./getFetchFn"; +import { getRequestBody } from "./getRequestBody"; +import { getResponseBody } from "./getResponseBody"; +import { makeRequest } from "./makeRequest"; +import { requestWithRetries } from "./requestWithRetries"; + +export type FetchFunction = (args: Fetcher.Args) => Promise>; + +export declare namespace Fetcher { + export interface Args { + url: string; + method: string; + contentType?: string; + headers?: Record; + queryParameters?: Record; + body?: unknown; + timeoutMs?: number; + maxRetries?: number; + withCredentials?: boolean; + abortSignal?: AbortSignal; + requestType?: "json" | "file" | "bytes"; + responseType?: "json" | "blob" | "streaming" | "text"; + duplex?: "half"; + } + + export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; + + export interface FailedStatusCodeError { + reason: "status-code"; + statusCode: number; + body: unknown; + } + + export interface NonJsonError { + reason: "non-json"; + statusCode: number; + rawBody: string; + } + + export interface TimeoutError { + reason: "timeout"; + } + + export interface UnknownError { + reason: "unknown"; + errorMessage: string; + } +} + +export async function fetcherImpl(args: Fetcher.Args): Promise> { + const headers: Record = {}; + if (args.body !== undefined && args.contentType != null) { + headers["Content-Type"] = args.contentType; + } + + if (args.headers != null) { + for (const [key, value] of Object.entries(args.headers)) { + if (value != null) { + headers[key] = value; + } + } + } + + const url = createRequestUrl(args.url, args.queryParameters); + let requestBody: BodyInit | undefined = await getRequestBody({ + body: args.body, + type: args.requestType === "json" ? "json" : "other", + }); + const fetchFn = await getFetchFn(); + + try { + const response = await requestWithRetries( + async () => + makeRequest( + fetchFn, + url, + args.method, + headers, + requestBody, + args.timeoutMs, + args.abortSignal, + args.withCredentials, + args.duplex + ), + args.maxRetries + ); + let responseBody = await getResponseBody(response, args.responseType); + + if (response.status >= 200 && response.status < 400) { + if (args.duplex && args.responseType === "streaming") { + responseBody = (await import("stream")).Readable.from(responseBody as any); + } + + return { + ok: true, + body: responseBody as R, + headers: response.headers, + }; + } else { + return { + ok: false, + error: { + reason: "status-code", + statusCode: response.status, + body: responseBody, + }, + }; + } + } catch (error) { + if (args.abortSignal != null && args.abortSignal.aborted) { + return { + ok: false, + error: { + reason: "unknown", + errorMessage: "The user aborted a request", + }, + }; + } else if (error instanceof Error && error.name === "AbortError") { + return { + ok: false, + error: { + reason: "timeout", + }, + }; + } else if (error instanceof Error) { + return { + ok: false, + error: { + reason: "unknown", + errorMessage: error.message, + }, + }; + } + + return { + ok: false, + error: { + reason: "unknown", + errorMessage: JSON.stringify(error), + }, + }; + } +} + +export const fetcher: FetchFunction = fetcherImpl; diff --git a/src/core/fetcher/Supplier.ts b/src/core/fetcher/Supplier.ts new file mode 100644 index 0000000..867c931 --- /dev/null +++ b/src/core/fetcher/Supplier.ts @@ -0,0 +1,11 @@ +export type Supplier = T | Promise | (() => T | Promise); + +export const Supplier = { + get: async (supplier: Supplier): Promise => { + if (typeof supplier === "function") { + return (supplier as () => T)(); + } else { + return supplier; + } + }, +}; diff --git a/src/core/fetcher/createRequestUrl.ts b/src/core/fetcher/createRequestUrl.ts new file mode 100644 index 0000000..9288a99 --- /dev/null +++ b/src/core/fetcher/createRequestUrl.ts @@ -0,0 +1,10 @@ +import qs from "qs"; + +export function createRequestUrl( + baseUrl: string, + queryParameters?: Record +): string { + return Object.keys(queryParameters ?? {}).length > 0 + ? `${baseUrl}?${qs.stringify(queryParameters, { arrayFormat: "repeat" })}` + : baseUrl; +} diff --git a/src/core/fetcher/getFetchFn.ts b/src/core/fetcher/getFetchFn.ts new file mode 100644 index 0000000..9fd9bfc --- /dev/null +++ b/src/core/fetcher/getFetchFn.ts @@ -0,0 +1,25 @@ +import { RUNTIME } from "../runtime"; + +/** + * Returns a fetch function based on the runtime + */ +export async function getFetchFn(): Promise { + // In Node.js 18+ environments, use native fetch + if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) { + return fetch; + } + + // In Node.js 18 or lower environments, the SDK always uses`node-fetch`. + if (RUNTIME.type === "node") { + return (await import("node-fetch")).default as any; + } + + // Otherwise the SDK uses global fetch if available, + // and falls back to node-fetch. + if (typeof fetch == "function") { + return fetch; + } + + // Defaults to node `node-fetch` if global fetch isn't available + return (await import("node-fetch")).default as any; +} diff --git a/src/core/fetcher/getHeader.ts b/src/core/fetcher/getHeader.ts new file mode 100644 index 0000000..50f922b --- /dev/null +++ b/src/core/fetcher/getHeader.ts @@ -0,0 +1,8 @@ +export function getHeader(headers: Record, header: string): string | undefined { + for (const [headerKey, headerValue] of Object.entries(headers)) { + if (headerKey.toLowerCase() === header.toLowerCase()) { + return headerValue; + } + } + return undefined; +} diff --git a/src/core/fetcher/getRequestBody.ts b/src/core/fetcher/getRequestBody.ts new file mode 100644 index 0000000..1138414 --- /dev/null +++ b/src/core/fetcher/getRequestBody.ts @@ -0,0 +1,14 @@ +export declare namespace GetRequestBody { + interface Args { + body: unknown; + type: "json" | "file" | "bytes" | "other"; + } +} + +export async function getRequestBody({ body, type }: GetRequestBody.Args): Promise { + if (type.includes("json")) { + return JSON.stringify(body); + } else { + return body as BodyInit; + } +} diff --git a/src/core/fetcher/getResponseBody.ts b/src/core/fetcher/getResponseBody.ts new file mode 100644 index 0000000..2015356 --- /dev/null +++ b/src/core/fetcher/getResponseBody.ts @@ -0,0 +1,28 @@ +export async function getResponseBody(response: Response, responseType?: string): Promise { + if (response.body != null && responseType === "blob") { + return await response.blob(); + } else if (response.body != null && responseType === "streaming") { + return response.body; + } else if (response.body != null && responseType === "text") { + return await response.text(); + } else { + const text = await response.text(); + if (text.length > 0) { + try { + let responseBody = JSON.parse(text); + return responseBody; + } catch (err) { + return { + ok: false, + error: { + reason: "non-json", + statusCode: response.status, + rawBody: text, + }, + }; + } + } else { + return undefined; + } + } +} diff --git a/src/core/fetcher/index.ts b/src/core/fetcher/index.ts new file mode 100644 index 0000000..2d658ca --- /dev/null +++ b/src/core/fetcher/index.ts @@ -0,0 +1,5 @@ +export type { APIResponse } from "./APIResponse"; +export { fetcher } from "./Fetcher"; +export type { Fetcher, FetchFunction } from "./Fetcher"; +export { getHeader } from "./getHeader"; +export { Supplier } from "./Supplier"; diff --git a/src/core/fetcher/makeRequest.ts b/src/core/fetcher/makeRequest.ts new file mode 100644 index 0000000..8fb4bac --- /dev/null +++ b/src/core/fetcher/makeRequest.ts @@ -0,0 +1,44 @@ +import { anySignal, getTimeoutSignal } from "./signals"; + +export const makeRequest = async ( + fetchFn: (url: string, init: RequestInit) => Promise, + url: string, + method: string, + headers: Record, + requestBody: BodyInit | undefined, + timeoutMs?: number, + abortSignal?: AbortSignal, + withCredentials?: boolean, + duplex?: "half" +): Promise => { + const signals: AbortSignal[] = []; + + // Add timeout signal + let timeoutAbortId: NodeJS.Timeout | undefined = undefined; + if (timeoutMs != null) { + const { signal, abortId } = getTimeoutSignal(timeoutMs); + timeoutAbortId = abortId; + signals.push(signal); + } + + // Add arbitrary signal + if (abortSignal != null) { + signals.push(abortSignal); + } + let newSignals = anySignal(signals); + const response = await fetchFn(url, { + method: method, + headers, + body: requestBody, + signal: newSignals, + credentials: withCredentials ? "include" : undefined, + // @ts-ignore + duplex, + }); + + if (timeoutAbortId != null) { + clearTimeout(timeoutAbortId); + } + + return response; +}; diff --git a/src/core/fetcher/requestWithRetries.ts b/src/core/fetcher/requestWithRetries.ts new file mode 100644 index 0000000..ff5dc3b --- /dev/null +++ b/src/core/fetcher/requestWithRetries.ts @@ -0,0 +1,21 @@ +const INITIAL_RETRY_DELAY = 1; +const MAX_RETRY_DELAY = 60; +const DEFAULT_MAX_RETRIES = 2; + +export async function requestWithRetries( + requestFn: () => Promise, + maxRetries: number = DEFAULT_MAX_RETRIES +): Promise { + let response: Response = await requestFn(); + + for (let i = 0; i < maxRetries; ++i) { + if ([408, 409, 429].includes(response.status) || response.status >= 500) { + const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); + await new Promise((resolve) => setTimeout(resolve, delay)); + response = await requestFn(); + } else { + break; + } + } + return response!; +} diff --git a/src/core/fetcher/signals.ts b/src/core/fetcher/signals.ts new file mode 100644 index 0000000..6c124ff --- /dev/null +++ b/src/core/fetcher/signals.ts @@ -0,0 +1,38 @@ +const TIMEOUT = "timeout"; + +export function getTimeoutSignal(timeoutMs: number): { signal: AbortSignal; abortId: NodeJS.Timeout } { + const controller = new AbortController(); + const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs); + return { signal: controller.signal, abortId }; +} + +/** + * Returns an abort signal that is getting aborted when + * at least one of the specified abort signals is aborted. + * + * Requires at least node.js 18. + */ +export function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal { + // Allowing signals to be passed either as array + // of signals or as multiple arguments. + const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args); + + const controller = new AbortController(); + + for (const signal of signals) { + if (signal.aborted) { + // Exiting early if one of the signals + // is already aborted. + controller.abort((signal as any)?.reason); + break; + } + + // Listening for signals and removing the listeners + // when at least one symbol is aborted. + signal.addEventListener("abort", () => controller.abort((signal as any)?.reason), { + signal: controller.signal, + }); + } + + return controller.signal; +} diff --git a/src/core/index.ts b/src/core/index.ts new file mode 100644 index 0000000..2d20c46 --- /dev/null +++ b/src/core/index.ts @@ -0,0 +1,4 @@ +export * from "./fetcher"; +export * from "./auth"; +export * from "./runtime"; +export * as serialization from "./schemas"; diff --git a/src/core/runtime/index.ts b/src/core/runtime/index.ts new file mode 100644 index 0000000..5c76dbb --- /dev/null +++ b/src/core/runtime/index.ts @@ -0,0 +1 @@ +export { RUNTIME } from "./runtime"; diff --git a/src/core/runtime/runtime.ts b/src/core/runtime/runtime.ts new file mode 100644 index 0000000..4d0687e --- /dev/null +++ b/src/core/runtime/runtime.ts @@ -0,0 +1,126 @@ +interface DenoGlobal { + version: { + deno: string; + }; +} + +interface BunGlobal { + version: string; +} + +declare const Deno: DenoGlobal; +declare const Bun: BunGlobal; + +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +const isWebWorker = + typeof self === "object" && + // @ts-ignore + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); + +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +const isDeno = + typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +const isNode = + typeof process !== "undefined" && + Boolean(process.version) && + Boolean(process.versions?.node) && + // Deno spoofs process.versions.node, see https://deno.land/std@0.177.0/node/process.ts?s=versions + !isDeno && + !isBun; + +/** + * A constant that indicates whether the environment the code is running is in React-Native. + * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js + */ +const isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + +/** + * A constant that indicates whether the environment the code is running is Cloudflare. + * https://developers.cloudflare.com/workers/runtime-apis/web-standards/#navigatoruseragent + */ +const isCloudflare = typeof globalThis !== "undefined" && globalThis?.navigator?.userAgent === "Cloudflare-Workers"; + +/** + * A constant that indicates which environment and version the SDK is running in. + */ +export const RUNTIME: Runtime = evaluateRuntime(); + +export interface Runtime { + type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd"; + version?: string; + parsedVersion?: number; +} + +function evaluateRuntime(): Runtime { + if (isBrowser) { + return { + type: "browser", + version: window.navigator.userAgent, + }; + } + + if (isCloudflare) { + return { + type: "workerd", + }; + } + + if (isWebWorker) { + return { + type: "web-worker", + }; + } + + if (isDeno) { + return { + type: "deno", + version: Deno.version.deno, + }; + } + + if (isBun) { + return { + type: "bun", + version: Bun.version, + }; + } + + if (isNode) { + return { + type: "node", + version: process.versions.node, + parsedVersion: Number(process.versions.node.split(".")[0]), + }; + } + + if (isReactNative) { + return { + type: "react-native", + }; + } + + return { + type: "unknown", + }; +} diff --git a/src/core/schemas/Schema.ts b/src/core/schemas/Schema.ts new file mode 100644 index 0000000..19acc5d --- /dev/null +++ b/src/core/schemas/Schema.ts @@ -0,0 +1,98 @@ +import { SchemaUtils } from "./builders"; + +export type Schema = BaseSchema & SchemaUtils; + +export type inferRaw = S extends Schema ? Raw : never; +export type inferParsed = S extends Schema ? Parsed : never; + +export interface BaseSchema { + parse: (raw: unknown, opts?: SchemaOptions) => MaybeValid; + json: (parsed: unknown, opts?: SchemaOptions) => MaybeValid; + getType: () => SchemaType | SchemaType; +} + +export const SchemaType = { + DATE: "date", + ENUM: "enum", + LIST: "list", + STRING_LITERAL: "stringLiteral", + BOOLEAN_LITERAL: "booleanLiteral", + OBJECT: "object", + ANY: "any", + BOOLEAN: "boolean", + NUMBER: "number", + STRING: "string", + UNKNOWN: "unknown", + RECORD: "record", + SET: "set", + UNION: "union", + UNDISCRIMINATED_UNION: "undiscriminatedUnion", + OPTIONAL: "optional", +} as const; +export type SchemaType = typeof SchemaType[keyof typeof SchemaType]; + +export type MaybeValid = Valid | Invalid; + +export interface Valid { + ok: true; + value: T; +} + +export interface Invalid { + ok: false; + errors: ValidationError[]; +} + +export interface ValidationError { + path: string[]; + message: string; +} + +export interface SchemaOptions { + /** + * how to handle unrecognized keys in objects + * + * @default "fail" + */ + unrecognizedObjectKeys?: "fail" | "passthrough" | "strip"; + + /** + * whether to fail when an unrecognized discriminant value is + * encountered in a union + * + * @default false + */ + allowUnrecognizedUnionMembers?: boolean; + + /** + * whether to fail when an unrecognized enum value is encountered + * + * @default false + */ + allowUnrecognizedEnumValues?: boolean; + + /** + * whether to allow data that doesn't conform to the schema. + * invalid data is passed through without transformation. + * + * when this is enabled, .parse() and .json() will always + * return `ok: true`. `.parseOrThrow()` and `.jsonOrThrow()` + * will never fail. + * + * @default false + */ + skipValidation?: boolean; + + /** + * each validation failure contains a "path" property, which is + * the breadcrumbs to the offending node in the JSON. you can supply + * a prefix that is prepended to all the errors' paths. this can be + * helpful for zurg's internal debug logging. + */ + breadcrumbsPrefix?: string[]; + + /** + * whether to send 'null' for optional properties explicitly set to 'undefined'. + */ + omitUndefined?: boolean; +} diff --git a/src/core/schemas/builders/date/date.ts b/src/core/schemas/builders/date/date.ts new file mode 100644 index 0000000..b70f24b --- /dev/null +++ b/src/core/schemas/builders/date/date.ts @@ -0,0 +1,65 @@ +import { BaseSchema, Schema, SchemaType } from "../../Schema"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; +import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; +import { getSchemaUtils } from "../schema-utils"; + +// https://stackoverflow.com/questions/12756159/regex-and-iso8601-formatted-datetime +const ISO_8601_REGEX = + /^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/; + +export function date(): Schema { + const baseSchema: BaseSchema = { + parse: (raw, { breadcrumbsPrefix = [] } = {}) => { + if (typeof raw !== "string") { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(raw, "string"), + }, + ], + }; + } + if (!ISO_8601_REGEX.test(raw)) { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(raw, "ISO 8601 date string"), + }, + ], + }; + } + return { + ok: true, + value: new Date(raw), + }; + }, + json: (date, { breadcrumbsPrefix = [] } = {}) => { + if (date instanceof Date) { + return { + ok: true, + value: date.toISOString(), + }; + } else { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(date, "Date object"), + }, + ], + }; + } + }, + getType: () => SchemaType.DATE, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + }; +} diff --git a/src/core/schemas/builders/date/index.ts b/src/core/schemas/builders/date/index.ts new file mode 100644 index 0000000..187b290 --- /dev/null +++ b/src/core/schemas/builders/date/index.ts @@ -0,0 +1 @@ +export { date } from "./date"; diff --git a/src/core/schemas/builders/enum/enum.ts b/src/core/schemas/builders/enum/enum.ts new file mode 100644 index 0000000..c1e24d6 --- /dev/null +++ b/src/core/schemas/builders/enum/enum.ts @@ -0,0 +1,43 @@ +import { Schema, SchemaType } from "../../Schema"; +import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; + +export function enum_(values: E): Schema { + const validValues = new Set(values); + + const schemaCreator = createIdentitySchemaCreator( + SchemaType.ENUM, + (value, { allowUnrecognizedEnumValues, breadcrumbsPrefix = [] } = {}) => { + if (typeof value !== "string") { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, "string"), + }, + ], + }; + } + + if (!validValues.has(value) && !allowUnrecognizedEnumValues) { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, "enum"), + }, + ], + }; + } + + return { + ok: true, + value: value as U, + }; + } + ); + + return schemaCreator(); +} diff --git a/src/core/schemas/builders/enum/index.ts b/src/core/schemas/builders/enum/index.ts new file mode 100644 index 0000000..fe6faed --- /dev/null +++ b/src/core/schemas/builders/enum/index.ts @@ -0,0 +1 @@ +export { enum_ } from "./enum"; diff --git a/src/core/schemas/builders/index.ts b/src/core/schemas/builders/index.ts new file mode 100644 index 0000000..050cd2c --- /dev/null +++ b/src/core/schemas/builders/index.ts @@ -0,0 +1,13 @@ +export * from "./date"; +export * from "./enum"; +export * from "./lazy"; +export * from "./list"; +export * from "./literals"; +export * from "./object"; +export * from "./object-like"; +export * from "./primitives"; +export * from "./record"; +export * from "./schema-utils"; +export * from "./set"; +export * from "./undiscriminated-union"; +export * from "./union"; diff --git a/src/core/schemas/builders/lazy/index.ts b/src/core/schemas/builders/lazy/index.ts new file mode 100644 index 0000000..77420fb --- /dev/null +++ b/src/core/schemas/builders/lazy/index.ts @@ -0,0 +1,3 @@ +export { lazy } from "./lazy"; +export type { SchemaGetter } from "./lazy"; +export { lazyObject } from "./lazyObject"; diff --git a/src/core/schemas/builders/lazy/lazy.ts b/src/core/schemas/builders/lazy/lazy.ts new file mode 100644 index 0000000..835c61f --- /dev/null +++ b/src/core/schemas/builders/lazy/lazy.ts @@ -0,0 +1,32 @@ +import { BaseSchema, Schema } from "../../Schema"; +import { getSchemaUtils } from "../schema-utils"; + +export type SchemaGetter> = () => SchemaType; + +export function lazy(getter: SchemaGetter>): Schema { + const baseSchema = constructLazyBaseSchema(getter); + return { + ...baseSchema, + ...getSchemaUtils(baseSchema), + }; +} + +export function constructLazyBaseSchema( + getter: SchemaGetter> +): BaseSchema { + return { + parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts), + json: (parsed, opts) => getMemoizedSchema(getter).json(parsed, opts), + getType: () => getMemoizedSchema(getter).getType(), + }; +} + +type MemoizedGetter> = SchemaGetter & { __zurg_memoized?: SchemaType }; + +export function getMemoizedSchema>(getter: SchemaGetter): SchemaType { + const castedGetter = getter as MemoizedGetter; + if (castedGetter.__zurg_memoized == null) { + castedGetter.__zurg_memoized = getter(); + } + return castedGetter.__zurg_memoized; +} diff --git a/src/core/schemas/builders/lazy/lazyObject.ts b/src/core/schemas/builders/lazy/lazyObject.ts new file mode 100644 index 0000000..38c9e28 --- /dev/null +++ b/src/core/schemas/builders/lazy/lazyObject.ts @@ -0,0 +1,20 @@ +import { getObjectUtils } from "../object"; +import { getObjectLikeUtils } from "../object-like"; +import { BaseObjectSchema, ObjectSchema } from "../object/types"; +import { getSchemaUtils } from "../schema-utils"; +import { constructLazyBaseSchema, getMemoizedSchema, SchemaGetter } from "./lazy"; + +export function lazyObject(getter: SchemaGetter>): ObjectSchema { + const baseSchema: BaseObjectSchema = { + ...constructLazyBaseSchema(getter), + _getRawProperties: () => getMemoizedSchema(getter)._getRawProperties(), + _getParsedProperties: () => getMemoizedSchema(getter)._getParsedProperties(), + }; + + return { + ...baseSchema, + ...getSchemaUtils(baseSchema), + ...getObjectLikeUtils(baseSchema), + ...getObjectUtils(baseSchema), + }; +} diff --git a/src/core/schemas/builders/list/index.ts b/src/core/schemas/builders/list/index.ts new file mode 100644 index 0000000..25f4bcc --- /dev/null +++ b/src/core/schemas/builders/list/index.ts @@ -0,0 +1 @@ +export { list } from "./list"; diff --git a/src/core/schemas/builders/list/list.ts b/src/core/schemas/builders/list/list.ts new file mode 100644 index 0000000..e4c5c4a --- /dev/null +++ b/src/core/schemas/builders/list/list.ts @@ -0,0 +1,73 @@ +import { BaseSchema, MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; +import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; +import { getSchemaUtils } from "../schema-utils"; + +export function list(schema: Schema): Schema { + const baseSchema: BaseSchema = { + parse: (raw, opts) => + validateAndTransformArray(raw, (item, index) => + schema.parse(item, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `[${index}]`], + }) + ), + json: (parsed, opts) => + validateAndTransformArray(parsed, (item, index) => + schema.json(item, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `[${index}]`], + }) + ), + getType: () => SchemaType.LIST, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + }; +} + +function validateAndTransformArray( + value: unknown, + transformItem: (item: Raw, index: number) => MaybeValid +): MaybeValid { + if (!Array.isArray(value)) { + return { + ok: false, + errors: [ + { + message: getErrorMessageForIncorrectType(value, "list"), + path: [], + }, + ], + }; + } + + const maybeValidItems = value.map((item, index) => transformItem(item, index)); + + return maybeValidItems.reduce>( + (acc, item) => { + if (acc.ok && item.ok) { + return { + ok: true, + value: [...acc.value, item.value], + }; + } + + const errors: ValidationError[] = []; + if (!acc.ok) { + errors.push(...acc.errors); + } + if (!item.ok) { + errors.push(...item.errors); + } + + return { + ok: false, + errors, + }; + }, + { ok: true, value: [] } + ); +} diff --git a/src/core/schemas/builders/literals/booleanLiteral.ts b/src/core/schemas/builders/literals/booleanLiteral.ts new file mode 100644 index 0000000..a83d22c --- /dev/null +++ b/src/core/schemas/builders/literals/booleanLiteral.ts @@ -0,0 +1,29 @@ +import { Schema, SchemaType } from "../../Schema"; +import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; + +export function booleanLiteral(literal: V): Schema { + const schemaCreator = createIdentitySchemaCreator( + SchemaType.BOOLEAN_LITERAL, + (value, { breadcrumbsPrefix = [] } = {}) => { + if (value === literal) { + return { + ok: true, + value: literal, + }; + } else { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, `${literal.toString()}`), + }, + ], + }; + } + } + ); + + return schemaCreator(); +} diff --git a/src/core/schemas/builders/literals/index.ts b/src/core/schemas/builders/literals/index.ts new file mode 100644 index 0000000..d2bf08f --- /dev/null +++ b/src/core/schemas/builders/literals/index.ts @@ -0,0 +1,2 @@ +export { stringLiteral } from "./stringLiteral"; +export { booleanLiteral } from "./booleanLiteral"; diff --git a/src/core/schemas/builders/literals/stringLiteral.ts b/src/core/schemas/builders/literals/stringLiteral.ts new file mode 100644 index 0000000..3939b76 --- /dev/null +++ b/src/core/schemas/builders/literals/stringLiteral.ts @@ -0,0 +1,29 @@ +import { Schema, SchemaType } from "../../Schema"; +import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; + +export function stringLiteral(literal: V): Schema { + const schemaCreator = createIdentitySchemaCreator( + SchemaType.STRING_LITERAL, + (value, { breadcrumbsPrefix = [] } = {}) => { + if (value === literal) { + return { + ok: true, + value: literal, + }; + } else { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, `"${literal}"`), + }, + ], + }; + } + } + ); + + return schemaCreator(); +} diff --git a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts new file mode 100644 index 0000000..8331d08 --- /dev/null +++ b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts @@ -0,0 +1,79 @@ +import { BaseSchema } from "../../Schema"; +import { filterObject } from "../../utils/filterObject"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; +import { isPlainObject } from "../../utils/isPlainObject"; +import { getSchemaUtils } from "../schema-utils"; +import { ObjectLikeSchema, ObjectLikeUtils } from "./types"; + +export function getObjectLikeUtils(schema: BaseSchema): ObjectLikeUtils { + return { + withParsedProperties: (properties) => withParsedProperties(schema, properties), + }; +} + +/** + * object-like utils are defined in one file to resolve issues with circular imports + */ + +export function withParsedProperties( + objectLike: BaseSchema, + properties: { [K in keyof Properties]: Properties[K] | ((parsed: ParsedObjectShape) => Properties[K]) } +): ObjectLikeSchema { + const objectSchema: BaseSchema = { + parse: (raw, opts) => { + const parsedObject = objectLike.parse(raw, opts); + if (!parsedObject.ok) { + return parsedObject; + } + + const additionalProperties = Object.entries(properties).reduce>( + (processed, [key, value]) => { + return { + ...processed, + [key]: typeof value === "function" ? value(parsedObject.value) : value, + }; + }, + {} + ); + + return { + ok: true, + value: { + ...parsedObject.value, + ...(additionalProperties as Properties), + }, + }; + }, + + json: (parsed, opts) => { + if (!isPlainObject(parsed)) { + return { + ok: false, + errors: [ + { + path: opts?.breadcrumbsPrefix ?? [], + message: getErrorMessageForIncorrectType(parsed, "object"), + }, + ], + }; + } + + // strip out added properties + const addedPropertyKeys = new Set(Object.keys(properties)); + const parsedWithoutAddedProperties = filterObject( + parsed, + Object.keys(parsed).filter((key) => !addedPropertyKeys.has(key)) + ); + + return objectLike.json(parsedWithoutAddedProperties as ParsedObjectShape, opts); + }, + + getType: () => objectLike.getType(), + }; + + return { + ...objectSchema, + ...getSchemaUtils(objectSchema), + ...getObjectLikeUtils(objectSchema), + }; +} diff --git a/src/core/schemas/builders/object-like/index.ts b/src/core/schemas/builders/object-like/index.ts new file mode 100644 index 0000000..c342e72 --- /dev/null +++ b/src/core/schemas/builders/object-like/index.ts @@ -0,0 +1,2 @@ +export { getObjectLikeUtils, withParsedProperties } from "./getObjectLikeUtils"; +export type { ObjectLikeSchema, ObjectLikeUtils } from "./types"; diff --git a/src/core/schemas/builders/object-like/types.ts b/src/core/schemas/builders/object-like/types.ts new file mode 100644 index 0000000..75b3698 --- /dev/null +++ b/src/core/schemas/builders/object-like/types.ts @@ -0,0 +1,11 @@ +import { BaseSchema, Schema } from "../../Schema"; + +export type ObjectLikeSchema = Schema & + BaseSchema & + ObjectLikeUtils; + +export interface ObjectLikeUtils { + withParsedProperties: >(properties: { + [K in keyof T]: T[K] | ((parsed: Parsed) => T[K]); + }) => ObjectLikeSchema; +} diff --git a/src/core/schemas/builders/object/index.ts b/src/core/schemas/builders/object/index.ts new file mode 100644 index 0000000..e3f4388 --- /dev/null +++ b/src/core/schemas/builders/object/index.ts @@ -0,0 +1,22 @@ +export { getObjectUtils, object } from "./object"; +export { objectWithoutOptionalProperties } from "./objectWithoutOptionalProperties"; +export type { + inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas, + inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas, +} from "./objectWithoutOptionalProperties"; +export { isProperty, property } from "./property"; +export type { Property } from "./property"; +export type { + BaseObjectSchema, + inferObjectSchemaFromPropertySchemas, + inferParsedObject, + inferParsedObjectFromPropertySchemas, + inferParsedPropertySchema, + inferRawKey, + inferRawObject, + inferRawObjectFromPropertySchemas, + inferRawPropertySchema, + ObjectSchema, + ObjectUtils, + PropertySchemas, +} from "./types"; diff --git a/src/core/schemas/builders/object/object.ts b/src/core/schemas/builders/object/object.ts new file mode 100644 index 0000000..e00136d --- /dev/null +++ b/src/core/schemas/builders/object/object.ts @@ -0,0 +1,324 @@ +import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; +import { entries } from "../../utils/entries"; +import { filterObject } from "../../utils/filterObject"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; +import { isPlainObject } from "../../utils/isPlainObject"; +import { keys } from "../../utils/keys"; +import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; +import { partition } from "../../utils/partition"; +import { getObjectLikeUtils } from "../object-like"; +import { getSchemaUtils } from "../schema-utils"; +import { isProperty } from "./property"; +import { + BaseObjectSchema, + inferObjectSchemaFromPropertySchemas, + inferParsedObjectFromPropertySchemas, + inferRawObjectFromPropertySchemas, + ObjectSchema, + ObjectUtils, + PropertySchemas, +} from "./types"; + +interface ObjectPropertyWithRawKey { + rawKey: string; + parsedKey: string; + valueSchema: Schema; +} + +export function object>( + schemas: T +): inferObjectSchemaFromPropertySchemas { + const baseSchema: BaseObjectSchema< + inferRawObjectFromPropertySchemas, + inferParsedObjectFromPropertySchemas + > = { + _getRawProperties: () => + Object.entries(schemas).map(([parsedKey, propertySchema]) => + isProperty(propertySchema) ? propertySchema.rawKey : parsedKey + ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], + _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], + + parse: (raw, opts) => { + const rawKeyToProperty: Record = {}; + const requiredKeys: string[] = []; + + for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { + const rawKey = isProperty(schemaOrObjectProperty) ? schemaOrObjectProperty.rawKey : parsedKey; + const valueSchema: Schema = isProperty(schemaOrObjectProperty) + ? schemaOrObjectProperty.valueSchema + : schemaOrObjectProperty; + + const property: ObjectPropertyWithRawKey = { + rawKey, + parsedKey: parsedKey as string, + valueSchema, + }; + + rawKeyToProperty[rawKey] = property; + + if (isSchemaRequired(valueSchema)) { + requiredKeys.push(rawKey); + } + } + + return validateAndTransformObject({ + value: raw, + requiredKeys, + getProperty: (rawKey) => { + const property = rawKeyToProperty[rawKey]; + if (property == null) { + return undefined; + } + return { + transformedKey: property.parsedKey, + transform: (propertyValue) => + property.valueSchema.parse(propertyValue, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), rawKey], + }), + }; + }, + unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, + skipValidation: opts?.skipValidation, + breadcrumbsPrefix: opts?.breadcrumbsPrefix, + omitUndefined: opts?.omitUndefined, + }); + }, + + json: (parsed, opts) => { + const requiredKeys: string[] = []; + + for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { + const valueSchema: Schema = isProperty(schemaOrObjectProperty) + ? schemaOrObjectProperty.valueSchema + : schemaOrObjectProperty; + + if (isSchemaRequired(valueSchema)) { + requiredKeys.push(parsedKey as string); + } + } + + return validateAndTransformObject({ + value: parsed, + requiredKeys, + getProperty: ( + parsedKey + ): { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined => { + const property = schemas[parsedKey as keyof T]; + + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (property == null) { + return undefined; + } + + if (isProperty(property)) { + return { + transformedKey: property.rawKey, + transform: (propertyValue) => + property.valueSchema.json(propertyValue, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], + }), + }; + } else { + return { + transformedKey: parsedKey, + transform: (propertyValue) => + property.json(propertyValue, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], + }), + }; + } + }, + unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, + skipValidation: opts?.skipValidation, + breadcrumbsPrefix: opts?.breadcrumbsPrefix, + omitUndefined: opts?.omitUndefined, + }); + }, + + getType: () => SchemaType.OBJECT, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + ...getObjectLikeUtils(baseSchema), + ...getObjectUtils(baseSchema), + }; +} + +function validateAndTransformObject({ + value, + requiredKeys, + getProperty, + unrecognizedObjectKeys = "fail", + skipValidation = false, + breadcrumbsPrefix = [], +}: { + value: unknown; + requiredKeys: string[]; + getProperty: ( + preTransformedKey: string + ) => { transformedKey: string; transform: (propertyValue: unknown) => MaybeValid } | undefined; + unrecognizedObjectKeys: "fail" | "passthrough" | "strip" | undefined; + skipValidation: boolean | undefined; + breadcrumbsPrefix: string[] | undefined; + omitUndefined: boolean | undefined; +}): MaybeValid { + if (!isPlainObject(value)) { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, "object"), + }, + ], + }; + } + + const missingRequiredKeys = new Set(requiredKeys); + const errors: ValidationError[] = []; + const transformed: Record = {}; + + for (const [preTransformedKey, preTransformedItemValue] of Object.entries(value)) { + const property = getProperty(preTransformedKey); + + if (property != null) { + missingRequiredKeys.delete(preTransformedKey); + + const value = property.transform(preTransformedItemValue); + if (value.ok) { + transformed[property.transformedKey] = value.value; + } else { + transformed[preTransformedKey] = preTransformedItemValue; + errors.push(...value.errors); + } + } else { + switch (unrecognizedObjectKeys) { + case "fail": + errors.push({ + path: [...breadcrumbsPrefix, preTransformedKey], + message: `Unexpected key "${preTransformedKey}"`, + }); + break; + case "strip": + break; + case "passthrough": + transformed[preTransformedKey] = preTransformedItemValue; + break; + } + } + } + + errors.push( + ...requiredKeys + .filter((key) => missingRequiredKeys.has(key)) + .map((key) => ({ + path: breadcrumbsPrefix, + message: `Missing required key "${key}"`, + })) + ); + + if (errors.length === 0 || skipValidation) { + return { + ok: true, + value: transformed as Transformed, + }; + } else { + return { + ok: false, + errors, + }; + } +} + +export function getObjectUtils(schema: BaseObjectSchema): ObjectUtils { + return { + extend: (extension: ObjectSchema) => { + const baseSchema: BaseObjectSchema = { + _getParsedProperties: () => [...schema._getParsedProperties(), ...extension._getParsedProperties()], + _getRawProperties: () => [...schema._getRawProperties(), ...extension._getRawProperties()], + parse: (raw, opts) => { + return validateAndTransformExtendedObject({ + extensionKeys: extension._getRawProperties(), + value: raw, + transformBase: (rawBase) => schema.parse(rawBase, opts), + transformExtension: (rawExtension) => extension.parse(rawExtension, opts), + }); + }, + json: (parsed, opts) => { + return validateAndTransformExtendedObject({ + extensionKeys: extension._getParsedProperties(), + value: parsed, + transformBase: (parsedBase) => schema.json(parsedBase, opts), + transformExtension: (parsedExtension) => extension.json(parsedExtension, opts), + }); + }, + getType: () => SchemaType.OBJECT, + }; + + return { + ...baseSchema, + ...getSchemaUtils(baseSchema), + ...getObjectLikeUtils(baseSchema), + ...getObjectUtils(baseSchema), + }; + }, + }; +} + +function validateAndTransformExtendedObject({ + extensionKeys, + value, + transformBase, + transformExtension, +}: { + extensionKeys: (keyof PreTransformedExtension)[]; + value: unknown; + transformBase: (value: unknown) => MaybeValid; + transformExtension: (value: unknown) => MaybeValid; +}): MaybeValid { + const extensionPropertiesSet = new Set(extensionKeys); + const [extensionProperties, baseProperties] = partition(keys(value), (key) => + extensionPropertiesSet.has(key as keyof PreTransformedExtension) + ); + + const transformedBase = transformBase(filterObject(value, baseProperties)); + const transformedExtension = transformExtension(filterObject(value, extensionProperties)); + + if (transformedBase.ok && transformedExtension.ok) { + return { + ok: true, + value: { + ...transformedBase.value, + ...transformedExtension.value, + }, + }; + } else { + return { + ok: false, + errors: [ + ...(transformedBase.ok ? [] : transformedBase.errors), + ...(transformedExtension.ok ? [] : transformedExtension.errors), + ], + }; + } +} + +function isSchemaRequired(schema: Schema): boolean { + return !isSchemaOptional(schema); +} + +function isSchemaOptional(schema: Schema): boolean { + switch (schema.getType()) { + case SchemaType.ANY: + case SchemaType.UNKNOWN: + case SchemaType.OPTIONAL: + return true; + default: + return false; + } +} diff --git a/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts b/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts new file mode 100644 index 0000000..a0951f4 --- /dev/null +++ b/src/core/schemas/builders/object/objectWithoutOptionalProperties.ts @@ -0,0 +1,18 @@ +import { object } from "./object"; +import { inferParsedPropertySchema, inferRawObjectFromPropertySchemas, ObjectSchema, PropertySchemas } from "./types"; + +export function objectWithoutOptionalProperties>( + schemas: T +): inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas { + return object(schemas) as unknown as inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas; +} + +export type inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas> = + ObjectSchema< + inferRawObjectFromPropertySchemas, + inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas + >; + +export type inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas> = { + [K in keyof T]: inferParsedPropertySchema; +}; diff --git a/src/core/schemas/builders/object/property.ts b/src/core/schemas/builders/object/property.ts new file mode 100644 index 0000000..d245c4b --- /dev/null +++ b/src/core/schemas/builders/object/property.ts @@ -0,0 +1,23 @@ +import { Schema } from "../../Schema"; + +export function property( + rawKey: RawKey, + valueSchema: Schema +): Property { + return { + rawKey, + valueSchema, + isProperty: true, + }; +} + +export interface Property { + rawKey: RawKey; + valueSchema: Schema; + isProperty: true; +} + +export function isProperty>(maybeProperty: unknown): maybeProperty is O { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + return (maybeProperty as O).isProperty; +} diff --git a/src/core/schemas/builders/object/types.ts b/src/core/schemas/builders/object/types.ts new file mode 100644 index 0000000..de9bb40 --- /dev/null +++ b/src/core/schemas/builders/object/types.ts @@ -0,0 +1,72 @@ +import { BaseSchema, inferParsed, inferRaw, Schema } from "../../Schema"; +import { addQuestionMarksToNullableProperties } from "../../utils/addQuestionMarksToNullableProperties"; +import { ObjectLikeUtils } from "../object-like"; +import { SchemaUtils } from "../schema-utils"; +import { Property } from "./property"; + +export type ObjectSchema = BaseObjectSchema & + ObjectLikeUtils & + ObjectUtils & + SchemaUtils; + +export interface BaseObjectSchema extends BaseSchema { + _getRawProperties: () => (keyof Raw)[]; + _getParsedProperties: () => (keyof Parsed)[]; +} + +export interface ObjectUtils { + extend: ( + schemas: ObjectSchema + ) => ObjectSchema; +} + +export type inferRawObject> = O extends ObjectSchema ? Raw : never; + +export type inferParsedObject> = O extends ObjectSchema + ? Parsed + : never; + +export type inferObjectSchemaFromPropertySchemas> = ObjectSchema< + inferRawObjectFromPropertySchemas, + inferParsedObjectFromPropertySchemas +>; + +export type inferRawObjectFromPropertySchemas> = + addQuestionMarksToNullableProperties<{ + [ParsedKey in keyof T as inferRawKey]: inferRawPropertySchema; + }>; + +export type inferParsedObjectFromPropertySchemas> = + addQuestionMarksToNullableProperties<{ + [K in keyof T]: inferParsedPropertySchema; + }>; + +export type PropertySchemas = Record< + ParsedKeys, + Property | Schema +>; + +export type inferRawPropertySchema

| Schema> = P extends Property< + any, + infer Raw, + any +> + ? Raw + : P extends Schema + ? inferRaw

+ : never; + +export type inferParsedPropertySchema

| Schema> = P extends Property< + any, + any, + infer Parsed +> + ? Parsed + : P extends Schema + ? inferParsed

+ : never; + +export type inferRawKey< + ParsedKey extends string | number | symbol, + P extends Property | Schema +> = P extends Property ? Raw : ParsedKey; diff --git a/src/core/schemas/builders/primitives/any.ts b/src/core/schemas/builders/primitives/any.ts new file mode 100644 index 0000000..fcaeb04 --- /dev/null +++ b/src/core/schemas/builders/primitives/any.ts @@ -0,0 +1,4 @@ +import { SchemaType } from "../../Schema"; +import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; + +export const any = createIdentitySchemaCreator(SchemaType.ANY, (value) => ({ ok: true, value })); diff --git a/src/core/schemas/builders/primitives/boolean.ts b/src/core/schemas/builders/primitives/boolean.ts new file mode 100644 index 0000000..fad6056 --- /dev/null +++ b/src/core/schemas/builders/primitives/boolean.ts @@ -0,0 +1,25 @@ +import { SchemaType } from "../../Schema"; +import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; + +export const boolean = createIdentitySchemaCreator( + SchemaType.BOOLEAN, + (value, { breadcrumbsPrefix = [] } = {}) => { + if (typeof value === "boolean") { + return { + ok: true, + value, + }; + } else { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, "boolean"), + }, + ], + }; + } + } +); diff --git a/src/core/schemas/builders/primitives/index.ts b/src/core/schemas/builders/primitives/index.ts new file mode 100644 index 0000000..788f941 --- /dev/null +++ b/src/core/schemas/builders/primitives/index.ts @@ -0,0 +1,5 @@ +export { any } from "./any"; +export { boolean } from "./boolean"; +export { number } from "./number"; +export { string } from "./string"; +export { unknown } from "./unknown"; diff --git a/src/core/schemas/builders/primitives/number.ts b/src/core/schemas/builders/primitives/number.ts new file mode 100644 index 0000000..c268945 --- /dev/null +++ b/src/core/schemas/builders/primitives/number.ts @@ -0,0 +1,25 @@ +import { SchemaType } from "../../Schema"; +import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; + +export const number = createIdentitySchemaCreator( + SchemaType.NUMBER, + (value, { breadcrumbsPrefix = [] } = {}) => { + if (typeof value === "number") { + return { + ok: true, + value, + }; + } else { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, "number"), + }, + ], + }; + } + } +); diff --git a/src/core/schemas/builders/primitives/string.ts b/src/core/schemas/builders/primitives/string.ts new file mode 100644 index 0000000..949f1f2 --- /dev/null +++ b/src/core/schemas/builders/primitives/string.ts @@ -0,0 +1,25 @@ +import { SchemaType } from "../../Schema"; +import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; + +export const string = createIdentitySchemaCreator( + SchemaType.STRING, + (value, { breadcrumbsPrefix = [] } = {}) => { + if (typeof value === "string") { + return { + ok: true, + value, + }; + } else { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, "string"), + }, + ], + }; + } + } +); diff --git a/src/core/schemas/builders/primitives/unknown.ts b/src/core/schemas/builders/primitives/unknown.ts new file mode 100644 index 0000000..4d52495 --- /dev/null +++ b/src/core/schemas/builders/primitives/unknown.ts @@ -0,0 +1,4 @@ +import { SchemaType } from "../../Schema"; +import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator"; + +export const unknown = createIdentitySchemaCreator(SchemaType.UNKNOWN, (value) => ({ ok: true, value })); diff --git a/src/core/schemas/builders/record/index.ts b/src/core/schemas/builders/record/index.ts new file mode 100644 index 0000000..82e25c5 --- /dev/null +++ b/src/core/schemas/builders/record/index.ts @@ -0,0 +1,2 @@ +export { record } from "./record"; +export type { BaseRecordSchema, RecordSchema } from "./types"; diff --git a/src/core/schemas/builders/record/record.ts b/src/core/schemas/builders/record/record.ts new file mode 100644 index 0000000..6683ac3 --- /dev/null +++ b/src/core/schemas/builders/record/record.ts @@ -0,0 +1,130 @@ +import { MaybeValid, Schema, SchemaType, ValidationError } from "../../Schema"; +import { entries } from "../../utils/entries"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; +import { isPlainObject } from "../../utils/isPlainObject"; +import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; +import { getSchemaUtils } from "../schema-utils"; +import { BaseRecordSchema, RecordSchema } from "./types"; + +export function record( + keySchema: Schema, + valueSchema: Schema +): RecordSchema { + const baseSchema: BaseRecordSchema = { + parse: (raw, opts) => { + return validateAndTransformRecord({ + value: raw, + isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, + transformKey: (key) => + keySchema.parse(key, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key} (key)`], + }), + transformValue: (value, key) => + valueSchema.parse(value, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key}`], + }), + breadcrumbsPrefix: opts?.breadcrumbsPrefix, + }); + }, + json: (parsed, opts) => { + return validateAndTransformRecord({ + value: parsed, + isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, + transformKey: (key) => + keySchema.json(key, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key} (key)`], + }), + transformValue: (value, key) => + valueSchema.json(value, { + ...opts, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key}`], + }), + breadcrumbsPrefix: opts?.breadcrumbsPrefix, + }); + }, + getType: () => SchemaType.RECORD, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + }; +} + +function validateAndTransformRecord({ + value, + isKeyNumeric, + transformKey, + transformValue, + breadcrumbsPrefix = [], +}: { + value: unknown; + isKeyNumeric: boolean; + transformKey: (key: string | number) => MaybeValid; + transformValue: (value: unknown, key: string | number) => MaybeValid; + breadcrumbsPrefix: string[] | undefined; +}): MaybeValid> { + if (!isPlainObject(value)) { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, "object"), + }, + ], + }; + } + + return entries(value).reduce>>( + (accPromise, [stringKey, value]) => { + // skip nullish keys + if (value == null) { + return accPromise; + } + + const acc = accPromise; + + let key: string | number = stringKey; + if (isKeyNumeric) { + const numberKey = stringKey.length > 0 ? Number(stringKey) : NaN; + if (!isNaN(numberKey)) { + key = numberKey; + } + } + const transformedKey = transformKey(key); + + const transformedValue = transformValue(value, key); + + if (acc.ok && transformedKey.ok && transformedValue.ok) { + return { + ok: true, + value: { + ...acc.value, + [transformedKey.value]: transformedValue.value, + }, + }; + } + + const errors: ValidationError[] = []; + if (!acc.ok) { + errors.push(...acc.errors); + } + if (!transformedKey.ok) { + errors.push(...transformedKey.errors); + } + if (!transformedValue.ok) { + errors.push(...transformedValue.errors); + } + + return { + ok: false, + errors, + }; + }, + { ok: true, value: {} as Record } + ); +} diff --git a/src/core/schemas/builders/record/types.ts b/src/core/schemas/builders/record/types.ts new file mode 100644 index 0000000..eb82cc7 --- /dev/null +++ b/src/core/schemas/builders/record/types.ts @@ -0,0 +1,17 @@ +import { BaseSchema } from "../../Schema"; +import { SchemaUtils } from "../schema-utils"; + +export type RecordSchema< + RawKey extends string | number, + RawValue, + ParsedKey extends string | number, + ParsedValue +> = BaseRecordSchema & + SchemaUtils, Record>; + +export type BaseRecordSchema< + RawKey extends string | number, + RawValue, + ParsedKey extends string | number, + ParsedValue +> = BaseSchema, Record>; diff --git a/src/core/schemas/builders/schema-utils/JsonError.ts b/src/core/schemas/builders/schema-utils/JsonError.ts new file mode 100644 index 0000000..2b89ca0 --- /dev/null +++ b/src/core/schemas/builders/schema-utils/JsonError.ts @@ -0,0 +1,9 @@ +import { ValidationError } from "../../Schema"; +import { stringifyValidationError } from "./stringifyValidationErrors"; + +export class JsonError extends Error { + constructor(public readonly errors: ValidationError[]) { + super(errors.map(stringifyValidationError).join("; ")); + Object.setPrototypeOf(this, JsonError.prototype); + } +} diff --git a/src/core/schemas/builders/schema-utils/ParseError.ts b/src/core/schemas/builders/schema-utils/ParseError.ts new file mode 100644 index 0000000..d056eb4 --- /dev/null +++ b/src/core/schemas/builders/schema-utils/ParseError.ts @@ -0,0 +1,9 @@ +import { ValidationError } from "../../Schema"; +import { stringifyValidationError } from "./stringifyValidationErrors"; + +export class ParseError extends Error { + constructor(public readonly errors: ValidationError[]) { + super(errors.map(stringifyValidationError).join("; ")); + Object.setPrototypeOf(this, ParseError.prototype); + } +} diff --git a/src/core/schemas/builders/schema-utils/getSchemaUtils.ts b/src/core/schemas/builders/schema-utils/getSchemaUtils.ts new file mode 100644 index 0000000..79ecad9 --- /dev/null +++ b/src/core/schemas/builders/schema-utils/getSchemaUtils.ts @@ -0,0 +1,105 @@ +import { BaseSchema, Schema, SchemaOptions, SchemaType } from "../../Schema"; +import { JsonError } from "./JsonError"; +import { ParseError } from "./ParseError"; + +export interface SchemaUtils { + optional: () => Schema; + transform: (transformer: SchemaTransformer) => Schema; + parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed; + jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw; +} + +export interface SchemaTransformer { + transform: (parsed: Parsed) => Transformed; + untransform: (transformed: any) => Parsed; +} + +export function getSchemaUtils(schema: BaseSchema): SchemaUtils { + return { + optional: () => optional(schema), + transform: (transformer) => transform(schema, transformer), + parseOrThrow: (raw, opts) => { + const parsed = schema.parse(raw, opts); + if (parsed.ok) { + return parsed.value; + } + throw new ParseError(parsed.errors); + }, + jsonOrThrow: (parsed, opts) => { + const raw = schema.json(parsed, opts); + if (raw.ok) { + return raw.value; + } + throw new JsonError(raw.errors); + }, + }; +} + +/** + * schema utils are defined in one file to resolve issues with circular imports + */ + +export function optional( + schema: BaseSchema +): Schema { + const baseSchema: BaseSchema = { + parse: (raw, opts) => { + if (raw == null) { + return { + ok: true, + value: undefined, + }; + } + return schema.parse(raw, opts); + }, + json: (parsed, opts) => { + if (opts?.omitUndefined && parsed === undefined) { + return { + ok: true, + value: undefined, + }; + } + if (parsed == null) { + return { + ok: true, + value: null, + }; + } + return schema.json(parsed, opts); + }, + getType: () => SchemaType.OPTIONAL, + }; + + return { + ...baseSchema, + ...getSchemaUtils(baseSchema), + }; +} + +export function transform( + schema: BaseSchema, + transformer: SchemaTransformer +): Schema { + const baseSchema: BaseSchema = { + parse: (raw, opts) => { + const parsed = schema.parse(raw, opts); + if (!parsed.ok) { + return parsed; + } + return { + ok: true, + value: transformer.transform(parsed.value), + }; + }, + json: (transformed, opts) => { + const parsed = transformer.untransform(transformed); + return schema.json(parsed, opts); + }, + getType: () => schema.getType(), + }; + + return { + ...baseSchema, + ...getSchemaUtils(baseSchema), + }; +} diff --git a/src/core/schemas/builders/schema-utils/index.ts b/src/core/schemas/builders/schema-utils/index.ts new file mode 100644 index 0000000..aa04e05 --- /dev/null +++ b/src/core/schemas/builders/schema-utils/index.ts @@ -0,0 +1,4 @@ +export { getSchemaUtils, optional, transform } from "./getSchemaUtils"; +export type { SchemaUtils } from "./getSchemaUtils"; +export { JsonError } from "./JsonError"; +export { ParseError } from "./ParseError"; diff --git a/src/core/schemas/builders/schema-utils/stringifyValidationErrors.ts b/src/core/schemas/builders/schema-utils/stringifyValidationErrors.ts new file mode 100644 index 0000000..4160f0a --- /dev/null +++ b/src/core/schemas/builders/schema-utils/stringifyValidationErrors.ts @@ -0,0 +1,8 @@ +import { ValidationError } from "../../Schema"; + +export function stringifyValidationError(error: ValidationError): string { + if (error.path.length === 0) { + return error.message; + } + return `${error.path.join(" -> ")}: ${error.message}`; +} diff --git a/src/core/schemas/builders/set/index.ts b/src/core/schemas/builders/set/index.ts new file mode 100644 index 0000000..f3310e8 --- /dev/null +++ b/src/core/schemas/builders/set/index.ts @@ -0,0 +1 @@ +export { set } from "./set"; diff --git a/src/core/schemas/builders/set/set.ts b/src/core/schemas/builders/set/set.ts new file mode 100644 index 0000000..e9e6bb7 --- /dev/null +++ b/src/core/schemas/builders/set/set.ts @@ -0,0 +1,43 @@ +import { BaseSchema, Schema, SchemaType } from "../../Schema"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; +import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; +import { list } from "../list"; +import { getSchemaUtils } from "../schema-utils"; + +export function set(schema: Schema): Schema> { + const listSchema = list(schema); + const baseSchema: BaseSchema> = { + parse: (raw, opts) => { + const parsedList = listSchema.parse(raw, opts); + if (parsedList.ok) { + return { + ok: true, + value: new Set(parsedList.value), + }; + } else { + return parsedList; + } + }, + json: (parsed, opts) => { + if (!(parsed instanceof Set)) { + return { + ok: false, + errors: [ + { + path: opts?.breadcrumbsPrefix ?? [], + message: getErrorMessageForIncorrectType(parsed, "Set"), + }, + ], + }; + } + const jsonList = listSchema.json([...parsed], opts); + return jsonList; + }, + getType: () => SchemaType.SET, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + }; +} diff --git a/src/core/schemas/builders/undiscriminated-union/index.ts b/src/core/schemas/builders/undiscriminated-union/index.ts new file mode 100644 index 0000000..75b71cb --- /dev/null +++ b/src/core/schemas/builders/undiscriminated-union/index.ts @@ -0,0 +1,6 @@ +export type { + inferParsedUnidiscriminatedUnionSchema, + inferRawUnidiscriminatedUnionSchema, + UndiscriminatedUnionSchema, +} from "./types"; +export { undiscriminatedUnion } from "./undiscriminatedUnion"; diff --git a/src/core/schemas/builders/undiscriminated-union/types.ts b/src/core/schemas/builders/undiscriminated-union/types.ts new file mode 100644 index 0000000..43e7108 --- /dev/null +++ b/src/core/schemas/builders/undiscriminated-union/types.ts @@ -0,0 +1,10 @@ +import { inferParsed, inferRaw, Schema } from "../../Schema"; + +export type UndiscriminatedUnionSchema = Schema< + inferRawUnidiscriminatedUnionSchema, + inferParsedUnidiscriminatedUnionSchema +>; + +export type inferRawUnidiscriminatedUnionSchema = inferRaw; + +export type inferParsedUnidiscriminatedUnionSchema = inferParsed; diff --git a/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts b/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts new file mode 100644 index 0000000..21ed3df --- /dev/null +++ b/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts @@ -0,0 +1,60 @@ +import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType, ValidationError } from "../../Schema"; +import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; +import { getSchemaUtils } from "../schema-utils"; +import { inferParsedUnidiscriminatedUnionSchema, inferRawUnidiscriminatedUnionSchema } from "./types"; + +export function undiscriminatedUnion, ...Schema[]]>( + schemas: Schemas +): Schema, inferParsedUnidiscriminatedUnionSchema> { + const baseSchema: BaseSchema< + inferRawUnidiscriminatedUnionSchema, + inferParsedUnidiscriminatedUnionSchema + > = { + parse: (raw, opts) => { + return validateAndTransformUndiscriminatedUnion>( + (schema, opts) => schema.parse(raw, opts), + schemas, + opts + ); + }, + json: (parsed, opts) => { + return validateAndTransformUndiscriminatedUnion>( + (schema, opts) => schema.json(parsed, opts), + schemas, + opts + ); + }, + getType: () => SchemaType.UNDISCRIMINATED_UNION, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + }; +} + +function validateAndTransformUndiscriminatedUnion( + transform: (schema: Schema, opts: SchemaOptions) => MaybeValid, + schemas: Schema[], + opts: SchemaOptions | undefined +): MaybeValid { + const errors: ValidationError[] = []; + for (const [index, schema] of schemas.entries()) { + const transformed = transform(schema, { ...opts, skipValidation: false }); + if (transformed.ok) { + return transformed; + } else { + for (const error of transformed.errors) { + errors.push({ + path: error.path, + message: `[Variant ${index}] ${error.message}`, + }); + } + } + } + + return { + ok: false, + errors, + }; +} diff --git a/src/core/schemas/builders/union/discriminant.ts b/src/core/schemas/builders/union/discriminant.ts new file mode 100644 index 0000000..55065bc --- /dev/null +++ b/src/core/schemas/builders/union/discriminant.ts @@ -0,0 +1,14 @@ +export function discriminant( + parsedDiscriminant: ParsedDiscriminant, + rawDiscriminant: RawDiscriminant +): Discriminant { + return { + parsedDiscriminant, + rawDiscriminant, + }; +} + +export interface Discriminant { + parsedDiscriminant: ParsedDiscriminant; + rawDiscriminant: RawDiscriminant; +} diff --git a/src/core/schemas/builders/union/index.ts b/src/core/schemas/builders/union/index.ts new file mode 100644 index 0000000..85fc008 --- /dev/null +++ b/src/core/schemas/builders/union/index.ts @@ -0,0 +1,10 @@ +export { discriminant } from "./discriminant"; +export type { Discriminant } from "./discriminant"; +export type { + inferParsedDiscriminant, + inferParsedUnion, + inferRawDiscriminant, + inferRawUnion, + UnionSubtypes, +} from "./types"; +export { union } from "./union"; diff --git a/src/core/schemas/builders/union/types.ts b/src/core/schemas/builders/union/types.ts new file mode 100644 index 0000000..6f82c86 --- /dev/null +++ b/src/core/schemas/builders/union/types.ts @@ -0,0 +1,26 @@ +import { inferParsedObject, inferRawObject, ObjectSchema } from "../object"; +import { Discriminant } from "./discriminant"; + +export type UnionSubtypes = { + [K in DiscriminantValues]: ObjectSchema; +}; + +export type inferRawUnion, U extends UnionSubtypes> = { + [K in keyof U]: Record, K> & inferRawObject; +}[keyof U]; + +export type inferParsedUnion, U extends UnionSubtypes> = { + [K in keyof U]: Record, K> & inferParsedObject; +}[keyof U]; + +export type inferRawDiscriminant> = D extends string + ? D + : D extends Discriminant + ? Raw + : never; + +export type inferParsedDiscriminant> = D extends string + ? D + : D extends Discriminant + ? Parsed + : never; diff --git a/src/core/schemas/builders/union/union.ts b/src/core/schemas/builders/union/union.ts new file mode 100644 index 0000000..ab61475 --- /dev/null +++ b/src/core/schemas/builders/union/union.ts @@ -0,0 +1,170 @@ +import { BaseSchema, MaybeValid, SchemaType } from "../../Schema"; +import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; +import { isPlainObject } from "../../utils/isPlainObject"; +import { keys } from "../../utils/keys"; +import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; +import { enum_ } from "../enum"; +import { ObjectSchema } from "../object"; +import { getObjectLikeUtils, ObjectLikeSchema } from "../object-like"; +import { getSchemaUtils } from "../schema-utils"; +import { Discriminant } from "./discriminant"; +import { inferParsedDiscriminant, inferParsedUnion, inferRawDiscriminant, inferRawUnion, UnionSubtypes } from "./types"; + +export function union, U extends UnionSubtypes>( + discriminant: D, + union: U +): ObjectLikeSchema, inferParsedUnion> { + const rawDiscriminant = + typeof discriminant === "string" ? discriminant : (discriminant.rawDiscriminant as inferRawDiscriminant); + const parsedDiscriminant = + typeof discriminant === "string" + ? discriminant + : (discriminant.parsedDiscriminant as inferParsedDiscriminant); + + const discriminantValueSchema = enum_(keys(union) as string[]); + + const baseSchema: BaseSchema, inferParsedUnion> = { + parse: (raw, opts) => { + return transformAndValidateUnion({ + value: raw, + discriminant: rawDiscriminant, + transformedDiscriminant: parsedDiscriminant, + transformDiscriminantValue: (discriminantValue) => + discriminantValueSchema.parse(discriminantValue, { + allowUnrecognizedEnumValues: opts?.allowUnrecognizedUnionMembers, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), rawDiscriminant], + }), + getAdditionalPropertiesSchema: (discriminantValue) => union[discriminantValue], + allowUnrecognizedUnionMembers: opts?.allowUnrecognizedUnionMembers, + transformAdditionalProperties: (additionalProperties, additionalPropertiesSchema) => + additionalPropertiesSchema.parse(additionalProperties, opts), + breadcrumbsPrefix: opts?.breadcrumbsPrefix, + }); + }, + json: (parsed, opts) => { + return transformAndValidateUnion({ + value: parsed, + discriminant: parsedDiscriminant, + transformedDiscriminant: rawDiscriminant, + transformDiscriminantValue: (discriminantValue) => + discriminantValueSchema.json(discriminantValue, { + allowUnrecognizedEnumValues: opts?.allowUnrecognizedUnionMembers, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedDiscriminant], + }), + getAdditionalPropertiesSchema: (discriminantValue) => union[discriminantValue], + allowUnrecognizedUnionMembers: opts?.allowUnrecognizedUnionMembers, + transformAdditionalProperties: (additionalProperties, additionalPropertiesSchema) => + additionalPropertiesSchema.json(additionalProperties, opts), + breadcrumbsPrefix: opts?.breadcrumbsPrefix, + }); + }, + getType: () => SchemaType.UNION, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + ...getObjectLikeUtils(baseSchema), + }; +} + +function transformAndValidateUnion< + TransformedDiscriminant extends string, + TransformedDiscriminantValue extends string, + TransformedAdditionalProperties +>({ + value, + discriminant, + transformedDiscriminant, + transformDiscriminantValue, + getAdditionalPropertiesSchema, + allowUnrecognizedUnionMembers = false, + transformAdditionalProperties, + breadcrumbsPrefix = [], +}: { + value: unknown; + discriminant: string; + transformedDiscriminant: TransformedDiscriminant; + transformDiscriminantValue: (discriminantValue: unknown) => MaybeValid; + getAdditionalPropertiesSchema: (discriminantValue: string) => ObjectSchema | undefined; + allowUnrecognizedUnionMembers: boolean | undefined; + transformAdditionalProperties: ( + additionalProperties: unknown, + additionalPropertiesSchema: ObjectSchema + ) => MaybeValid; + breadcrumbsPrefix: string[] | undefined; +}): MaybeValid & TransformedAdditionalProperties> { + if (!isPlainObject(value)) { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: getErrorMessageForIncorrectType(value, "object"), + }, + ], + }; + } + + const { [discriminant]: discriminantValue, ...additionalProperties } = value; + + if (discriminantValue == null) { + return { + ok: false, + errors: [ + { + path: breadcrumbsPrefix, + message: `Missing discriminant ("${discriminant}")`, + }, + ], + }; + } + + const transformedDiscriminantValue = transformDiscriminantValue(discriminantValue); + if (!transformedDiscriminantValue.ok) { + return { + ok: false, + errors: transformedDiscriminantValue.errors, + }; + } + + const additionalPropertiesSchema = getAdditionalPropertiesSchema(transformedDiscriminantValue.value); + + if (additionalPropertiesSchema == null) { + if (allowUnrecognizedUnionMembers) { + return { + ok: true, + value: { + [transformedDiscriminant]: transformedDiscriminantValue.value, + ...additionalProperties, + } as Record & TransformedAdditionalProperties, + }; + } else { + return { + ok: false, + errors: [ + { + path: [...breadcrumbsPrefix, discriminant], + message: "Unexpected discriminant value", + }, + ], + }; + } + } + + const transformedAdditionalProperties = transformAdditionalProperties( + additionalProperties, + additionalPropertiesSchema + ); + if (!transformedAdditionalProperties.ok) { + return transformedAdditionalProperties; + } + + return { + ok: true, + value: { + [transformedDiscriminant]: discriminantValue, + ...transformedAdditionalProperties.value, + } as Record & TransformedAdditionalProperties, + }; +} diff --git a/src/core/schemas/index.ts b/src/core/schemas/index.ts new file mode 100644 index 0000000..5429d8b --- /dev/null +++ b/src/core/schemas/index.ts @@ -0,0 +1,2 @@ +export * from "./builders"; +export type { inferParsed, inferRaw, Schema, SchemaOptions } from "./Schema"; diff --git a/src/core/schemas/utils/MaybePromise.ts b/src/core/schemas/utils/MaybePromise.ts new file mode 100644 index 0000000..9cd354b --- /dev/null +++ b/src/core/schemas/utils/MaybePromise.ts @@ -0,0 +1 @@ +export type MaybePromise = T | Promise; diff --git a/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts b/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts new file mode 100644 index 0000000..4111d70 --- /dev/null +++ b/src/core/schemas/utils/addQuestionMarksToNullableProperties.ts @@ -0,0 +1,15 @@ +export type addQuestionMarksToNullableProperties = { + [K in OptionalKeys]?: T[K]; +} & Pick>; + +export type OptionalKeys = { + [K in keyof T]-?: undefined extends T[K] + ? K + : null extends T[K] + ? K + : 1 extends (any extends T[K] ? 0 : 1) + ? never + : K; +}[keyof T]; + +export type RequiredKeys = Exclude>; diff --git a/src/core/schemas/utils/createIdentitySchemaCreator.ts b/src/core/schemas/utils/createIdentitySchemaCreator.ts new file mode 100644 index 0000000..de107cf --- /dev/null +++ b/src/core/schemas/utils/createIdentitySchemaCreator.ts @@ -0,0 +1,21 @@ +import { getSchemaUtils } from "../builders/schema-utils"; +import { BaseSchema, MaybeValid, Schema, SchemaOptions, SchemaType } from "../Schema"; +import { maybeSkipValidation } from "./maybeSkipValidation"; + +export function createIdentitySchemaCreator( + schemaType: SchemaType, + validate: (value: unknown, opts?: SchemaOptions) => MaybeValid +): () => Schema { + return () => { + const baseSchema: BaseSchema = { + parse: validate, + json: validate, + getType: () => schemaType, + }; + + return { + ...maybeSkipValidation(baseSchema), + ...getSchemaUtils(baseSchema), + }; + }; +} diff --git a/src/core/schemas/utils/entries.ts b/src/core/schemas/utils/entries.ts new file mode 100644 index 0000000..e122952 --- /dev/null +++ b/src/core/schemas/utils/entries.ts @@ -0,0 +1,3 @@ +export function entries(object: T): [keyof T, T[keyof T]][] { + return Object.entries(object) as [keyof T, T[keyof T]][]; +} diff --git a/src/core/schemas/utils/filterObject.ts b/src/core/schemas/utils/filterObject.ts new file mode 100644 index 0000000..2c25a34 --- /dev/null +++ b/src/core/schemas/utils/filterObject.ts @@ -0,0 +1,10 @@ +export function filterObject(obj: T, keysToInclude: K[]): Pick { + const keysToIncludeSet = new Set(keysToInclude); + return Object.entries(obj).reduce((acc, [key, value]) => { + if (keysToIncludeSet.has(key as K)) { + acc[key as K] = value; + } + return acc; + // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter + }, {} as Pick); +} diff --git a/src/core/schemas/utils/getErrorMessageForIncorrectType.ts b/src/core/schemas/utils/getErrorMessageForIncorrectType.ts new file mode 100644 index 0000000..438012d --- /dev/null +++ b/src/core/schemas/utils/getErrorMessageForIncorrectType.ts @@ -0,0 +1,21 @@ +export function getErrorMessageForIncorrectType(value: unknown, expectedType: string): string { + return `Expected ${expectedType}. Received ${getTypeAsString(value)}.`; +} + +function getTypeAsString(value: unknown): string { + if (Array.isArray(value)) { + return "list"; + } + if (value === null) { + return "null"; + } + switch (typeof value) { + case "string": + return `"${value}"`; + case "number": + case "boolean": + case "undefined": + return `${value}`; + } + return typeof value; +} diff --git a/src/core/schemas/utils/isPlainObject.ts b/src/core/schemas/utils/isPlainObject.ts new file mode 100644 index 0000000..db82a72 --- /dev/null +++ b/src/core/schemas/utils/isPlainObject.ts @@ -0,0 +1,17 @@ +// borrowed from https://github.com/lodash/lodash/blob/master/isPlainObject.js +export function isPlainObject(value: unknown): value is Record { + if (typeof value !== "object" || value === null) { + return false; + } + + if (Object.getPrototypeOf(value) === null) { + return true; + } + + let proto = value; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + + return Object.getPrototypeOf(value) === proto; +} diff --git a/src/core/schemas/utils/keys.ts b/src/core/schemas/utils/keys.ts new file mode 100644 index 0000000..0186709 --- /dev/null +++ b/src/core/schemas/utils/keys.ts @@ -0,0 +1,3 @@ +export function keys(object: T): (keyof T)[] { + return Object.keys(object) as (keyof T)[]; +} diff --git a/src/core/schemas/utils/maybeSkipValidation.ts b/src/core/schemas/utils/maybeSkipValidation.ts new file mode 100644 index 0000000..86c07ab --- /dev/null +++ b/src/core/schemas/utils/maybeSkipValidation.ts @@ -0,0 +1,38 @@ +import { BaseSchema, MaybeValid, SchemaOptions } from "../Schema"; + +export function maybeSkipValidation, Raw, Parsed>(schema: S): S { + return { + ...schema, + json: transformAndMaybeSkipValidation(schema.json), + parse: transformAndMaybeSkipValidation(schema.parse), + }; +} + +function transformAndMaybeSkipValidation( + transform: (value: unknown, opts?: SchemaOptions) => MaybeValid +): (value: unknown, opts?: SchemaOptions) => MaybeValid { + return (value, opts): MaybeValid => { + const transformed = transform(value, opts); + const { skipValidation = false } = opts ?? {}; + if (!transformed.ok && skipValidation) { + // eslint-disable-next-line no-console + console.warn( + [ + "Failed to validate.", + ...transformed.errors.map( + (error) => + " - " + + (error.path.length > 0 ? `${error.path.join(".")}: ${error.message}` : error.message) + ), + ].join("\n") + ); + + return { + ok: true, + value: value as T, + }; + } else { + return transformed; + } + }; +} diff --git a/src/core/schemas/utils/partition.ts b/src/core/schemas/utils/partition.ts new file mode 100644 index 0000000..f58d6f3 --- /dev/null +++ b/src/core/schemas/utils/partition.ts @@ -0,0 +1,12 @@ +export function partition(items: readonly T[], predicate: (item: T) => boolean): [T[], T[]] { + const trueItems: T[] = [], + falseItems: T[] = []; + for (const item of items) { + if (predicate(item)) { + trueItems.push(item); + } else { + falseItems.push(item); + } + } + return [trueItems, falseItems]; +} diff --git a/src/environments.ts b/src/environments.ts new file mode 100644 index 0000000..abe4096 --- /dev/null +++ b/src/environments.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export const GooeyEnvironment = { + Default: "https://api.gooey.ai", +} as const; + +export type GooeyEnvironment = typeof GooeyEnvironment.Default; diff --git a/src/errors/GooeyError.ts b/src/errors/GooeyError.ts new file mode 100644 index 0000000..033d929 --- /dev/null +++ b/src/errors/GooeyError.ts @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export class GooeyError extends Error { + readonly statusCode?: number; + readonly body?: unknown; + + constructor({ message, statusCode, body }: { message?: string; statusCode?: number; body?: unknown }) { + super(buildMessage({ message, statusCode, body })); + Object.setPrototypeOf(this, GooeyError.prototype); + if (statusCode != null) { + this.statusCode = statusCode; + } + + if (body !== undefined) { + this.body = body; + } + } +} + +function buildMessage({ + message, + statusCode, + body, +}: { + message: string | undefined; + statusCode: number | undefined; + body: unknown | undefined; +}): string { + let lines: string[] = []; + if (message != null) { + lines.push(message); + } + + if (statusCode != null) { + lines.push(`Status code: ${statusCode.toString()}`); + } + + if (body != null) { + lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`); + } + + return lines.join("\n"); +} diff --git a/src/errors/GooeyTimeoutError.ts b/src/errors/GooeyTimeoutError.ts new file mode 100644 index 0000000..f456ddd --- /dev/null +++ b/src/errors/GooeyTimeoutError.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export class GooeyTimeoutError extends Error { + constructor() { + super("Timeout"); + Object.setPrototypeOf(this, GooeyTimeoutError.prototype); + } +} diff --git a/src/errors/index.ts b/src/errors/index.ts new file mode 100644 index 0000000..1b44238 --- /dev/null +++ b/src/errors/index.ts @@ -0,0 +1,2 @@ +export { GooeyError } from "./GooeyError"; +export { GooeyTimeoutError } from "./GooeyTimeoutError"; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..37bf9ca --- /dev/null +++ b/src/index.ts @@ -0,0 +1,4 @@ +export * as Gooey from "./api"; +export { GooeyClient } from "./Client"; +export { GooeyEnvironment } from "./environments"; +export { GooeyError, GooeyTimeoutError } from "./errors"; diff --git a/src/serialization/index.ts b/src/serialization/index.ts new file mode 100644 index 0000000..3e15e29 --- /dev/null +++ b/src/serialization/index.ts @@ -0,0 +1,2 @@ +export * from "./resources"; +export * from "./types"; diff --git a/src/serialization/resources/copilotIntegrations/client/index.ts b/src/serialization/resources/copilotIntegrations/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/copilotIntegrations/client/requests/CreateStreamRequest.ts b/src/serialization/resources/copilotIntegrations/client/requests/CreateStreamRequest.ts new file mode 100644 index 0000000..2a0a675 --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/client/requests/CreateStreamRequest.ts @@ -0,0 +1,180 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Gooey from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ButtonPressed } from "../../../../types/ButtonPressed"; +import { RecipeFunction } from "../../../../types/RecipeFunction"; +import { ConversationEntry } from "../../../../types/ConversationEntry"; +import { CreateStreamRequestSelectedModel } from "../../types/CreateStreamRequestSelectedModel"; +import { CreateStreamRequestEmbeddingModel } from "../../types/CreateStreamRequestEmbeddingModel"; +import { CreateStreamRequestCitationStyle } from "../../types/CreateStreamRequestCitationStyle"; +import { CreateStreamRequestAsrModel } from "../../types/CreateStreamRequestAsrModel"; +import { CreateStreamRequestTranslationModel } from "../../types/CreateStreamRequestTranslationModel"; +import { CreateStreamRequestLipsyncModel } from "../../types/CreateStreamRequestLipsyncModel"; +import { LlmTools } from "../../../../types/LlmTools"; +import { CreateStreamRequestTtsProvider } from "../../types/CreateStreamRequestTtsProvider"; +import { CreateStreamRequestOpenaiVoiceName } from "../../types/CreateStreamRequestOpenaiVoiceName"; +import { CreateStreamRequestOpenaiTtsModel } from "../../types/CreateStreamRequestOpenaiTtsModel"; +import { SadTalkerSettings } from "../../../../types/SadTalkerSettings"; + +export const CreateStreamRequest: core.serialization.Schema< + serializers.CreateStreamRequest.Raw, + Gooey.CreateStreamRequest +> = core.serialization.object({ + integrationId: core.serialization.property("integration_id", core.serialization.string()), + conversationId: core.serialization.property("conversation_id", core.serialization.string().optional()), + userId: core.serialization.property("user_id", core.serialization.string().optional()), + userMessageId: core.serialization.property("user_message_id", core.serialization.string().optional()), + buttonPressed: core.serialization.property("button_pressed", ButtonPressed.optional()), + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputPrompt: core.serialization.property("input_prompt", core.serialization.string().optional()), + inputAudio: core.serialization.property("input_audio", core.serialization.string().optional()), + inputImages: core.serialization.property( + "input_images", + core.serialization.list(core.serialization.string()).optional() + ), + inputDocuments: core.serialization.property( + "input_documents", + core.serialization.list(core.serialization.string()).optional() + ), + docExtractUrl: core.serialization.property("doc_extract_url", core.serialization.string().optional()), + messages: core.serialization.list(ConversationEntry).optional(), + botScript: core.serialization.property("bot_script", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", CreateStreamRequestSelectedModel.optional()), + documentModel: core.serialization.property("document_model", core.serialization.string().optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + queryInstructions: core.serialization.property("query_instructions", core.serialization.string().optional()), + keywordInstructions: core.serialization.property("keyword_instructions", core.serialization.string().optional()), + documents: core.serialization.list(core.serialization.string()).optional(), + maxReferences: core.serialization.property("max_references", core.serialization.number().optional()), + maxContextWords: core.serialization.property("max_context_words", core.serialization.number().optional()), + scrollJump: core.serialization.property("scroll_jump", core.serialization.number().optional()), + embeddingModel: core.serialization.property("embedding_model", CreateStreamRequestEmbeddingModel.optional()), + denseWeight: core.serialization.property("dense_weight", core.serialization.number().optional()), + citationStyle: core.serialization.property("citation_style", CreateStreamRequestCitationStyle.optional()), + useUrlShortener: core.serialization.property("use_url_shortener", core.serialization.boolean().optional()), + asrModel: core.serialization.property("asr_model", CreateStreamRequestAsrModel.optional()), + asrLanguage: core.serialization.property("asr_language", core.serialization.string().optional()), + translationModel: core.serialization.property("translation_model", CreateStreamRequestTranslationModel.optional()), + userLanguage: core.serialization.property("user_language", core.serialization.string().optional()), + inputGlossaryDocument: core.serialization.property( + "input_glossary_document", + core.serialization.string().optional() + ), + outputGlossaryDocument: core.serialization.property( + "output_glossary_document", + core.serialization.string().optional() + ), + lipsyncModel: core.serialization.property("lipsync_model", CreateStreamRequestLipsyncModel.optional()), + tools: core.serialization.list(LlmTools).optional(), + ttsProvider: core.serialization.property("tts_provider", CreateStreamRequestTtsProvider.optional()), + uberduckVoiceName: core.serialization.property("uberduck_voice_name", core.serialization.string().optional()), + uberduckSpeakingRate: core.serialization.property("uberduck_speaking_rate", core.serialization.number().optional()), + googleVoiceName: core.serialization.property("google_voice_name", core.serialization.string().optional()), + googleSpeakingRate: core.serialization.property("google_speaking_rate", core.serialization.number().optional()), + googlePitch: core.serialization.property("google_pitch", core.serialization.number().optional()), + barkHistoryPrompt: core.serialization.property("bark_history_prompt", core.serialization.string().optional()), + elevenlabsVoiceName: core.serialization.property("elevenlabs_voice_name", core.serialization.string().optional()), + elevenlabsApiKey: core.serialization.property("elevenlabs_api_key", core.serialization.string().optional()), + elevenlabsVoiceId: core.serialization.property("elevenlabs_voice_id", core.serialization.string().optional()), + elevenlabsModel: core.serialization.property("elevenlabs_model", core.serialization.string().optional()), + elevenlabsStability: core.serialization.property("elevenlabs_stability", core.serialization.number().optional()), + elevenlabsSimilarityBoost: core.serialization.property( + "elevenlabs_similarity_boost", + core.serialization.number().optional() + ), + elevenlabsStyle: core.serialization.property("elevenlabs_style", core.serialization.number().optional()), + elevenlabsSpeakerBoost: core.serialization.property( + "elevenlabs_speaker_boost", + core.serialization.boolean().optional() + ), + azureVoiceName: core.serialization.property("azure_voice_name", core.serialization.string().optional()), + openaiVoiceName: core.serialization.property("openai_voice_name", CreateStreamRequestOpenaiVoiceName.optional()), + openaiTtsModel: core.serialization.property("openai_tts_model", CreateStreamRequestOpenaiTtsModel.optional()), + inputFace: core.serialization.property("input_face", core.serialization.string().optional()), + facePaddingTop: core.serialization.property("face_padding_top", core.serialization.number().optional()), + facePaddingBottom: core.serialization.property("face_padding_bottom", core.serialization.number().optional()), + facePaddingLeft: core.serialization.property("face_padding_left", core.serialization.number().optional()), + facePaddingRight: core.serialization.property("face_padding_right", core.serialization.number().optional()), + sadtalkerSettings: core.serialization.property("sadtalker_settings", SadTalkerSettings.optional()), + inputText: core.serialization.property("input_text", core.serialization.string().optional()), +}); + +export declare namespace CreateStreamRequest { + interface Raw { + integration_id: string; + conversation_id?: string | null; + user_id?: string | null; + user_message_id?: string | null; + button_pressed?: ButtonPressed.Raw | null; + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_prompt?: string | null; + input_audio?: string | null; + input_images?: string[] | null; + input_documents?: string[] | null; + doc_extract_url?: string | null; + messages?: ConversationEntry.Raw[] | null; + bot_script?: string | null; + selected_model?: CreateStreamRequestSelectedModel.Raw | null; + document_model?: string | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + task_instructions?: string | null; + query_instructions?: string | null; + keyword_instructions?: string | null; + documents?: string[] | null; + max_references?: number | null; + max_context_words?: number | null; + scroll_jump?: number | null; + embedding_model?: CreateStreamRequestEmbeddingModel.Raw | null; + dense_weight?: number | null; + citation_style?: CreateStreamRequestCitationStyle.Raw | null; + use_url_shortener?: boolean | null; + asr_model?: CreateStreamRequestAsrModel.Raw | null; + asr_language?: string | null; + translation_model?: CreateStreamRequestTranslationModel.Raw | null; + user_language?: string | null; + input_glossary_document?: string | null; + output_glossary_document?: string | null; + lipsync_model?: CreateStreamRequestLipsyncModel.Raw | null; + tools?: LlmTools.Raw[] | null; + tts_provider?: CreateStreamRequestTtsProvider.Raw | null; + uberduck_voice_name?: string | null; + uberduck_speaking_rate?: number | null; + google_voice_name?: string | null; + google_speaking_rate?: number | null; + google_pitch?: number | null; + bark_history_prompt?: string | null; + elevenlabs_voice_name?: string | null; + elevenlabs_api_key?: string | null; + elevenlabs_voice_id?: string | null; + elevenlabs_model?: string | null; + elevenlabs_stability?: number | null; + elevenlabs_similarity_boost?: number | null; + elevenlabs_style?: number | null; + elevenlabs_speaker_boost?: boolean | null; + azure_voice_name?: string | null; + openai_voice_name?: CreateStreamRequestOpenaiVoiceName.Raw | null; + openai_tts_model?: CreateStreamRequestOpenaiTtsModel.Raw | null; + input_face?: string | null; + face_padding_top?: number | null; + face_padding_bottom?: number | null; + face_padding_left?: number | null; + face_padding_right?: number | null; + sadtalker_settings?: SadTalkerSettings.Raw | null; + input_text?: string | null; + } +} diff --git a/src/serialization/resources/copilotIntegrations/client/requests/index.ts b/src/serialization/resources/copilotIntegrations/client/requests/index.ts new file mode 100644 index 0000000..6cf898f --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/client/requests/index.ts @@ -0,0 +1 @@ +export { CreateStreamRequest } from "./CreateStreamRequest"; diff --git a/src/serialization/resources/copilotIntegrations/index.ts b/src/serialization/resources/copilotIntegrations/index.ts new file mode 100644 index 0000000..c9240f8 --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestAsrModel.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestAsrModel.ts new file mode 100644 index 0000000..205beb0 --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestAsrModel.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestAsrModel: core.serialization.Schema< + serializers.CreateStreamRequestAsrModel.Raw, + Gooey.CreateStreamRequestAsrModel +> = core.serialization.enum_([ + "whisper_large_v2", + "whisper_large_v3", + "whisper_hindi_large_v2", + "whisper_telugu_large_v2", + "nemo_english", + "nemo_hindi", + "vakyansh_bhojpuri", + "gcp_v1", + "usm", + "deepgram", + "azure", + "seamless_m4t", + "mms_1b_all", +]); + +export declare namespace CreateStreamRequestAsrModel { + type Raw = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestCitationStyle.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestCitationStyle.ts new file mode 100644 index 0000000..c9cc756 --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestCitationStyle.ts @@ -0,0 +1,49 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestCitationStyle: core.serialization.Schema< + serializers.CreateStreamRequestCitationStyle.Raw, + Gooey.CreateStreamRequestCitationStyle +> = core.serialization.enum_([ + "number", + "title", + "url", + "symbol", + "markdown", + "html", + "slack_mrkdwn", + "plaintext", + "number_markdown", + "number_html", + "number_slack_mrkdwn", + "number_plaintext", + "symbol_markdown", + "symbol_html", + "symbol_slack_mrkdwn", + "symbol_plaintext", +]); + +export declare namespace CreateStreamRequestCitationStyle { + type Raw = + | "number" + | "title" + | "url" + | "symbol" + | "markdown" + | "html" + | "slack_mrkdwn" + | "plaintext" + | "number_markdown" + | "number_html" + | "number_slack_mrkdwn" + | "number_plaintext" + | "symbol_markdown" + | "symbol_html" + | "symbol_slack_mrkdwn" + | "symbol_plaintext"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestEmbeddingModel.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestEmbeddingModel.ts new file mode 100644 index 0000000..447b3bc --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestEmbeddingModel.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestEmbeddingModel: core.serialization.Schema< + serializers.CreateStreamRequestEmbeddingModel.Raw, + Gooey.CreateStreamRequestEmbeddingModel +> = core.serialization.enum_([ + "openai_3_large", + "openai_3_small", + "openai_ada_2", + "e5_large_v2", + "e5_base_v2", + "multilingual_e5_base", + "multilingual_e5_large", + "gte_large", + "gte_base", +]); + +export declare namespace CreateStreamRequestEmbeddingModel { + type Raw = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestLipsyncModel.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestLipsyncModel.ts new file mode 100644 index 0000000..62a566f --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestLipsyncModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestLipsyncModel: core.serialization.Schema< + serializers.CreateStreamRequestLipsyncModel.Raw, + Gooey.CreateStreamRequestLipsyncModel +> = core.serialization.enum_(["Wav2Lip", "SadTalker"]); + +export declare namespace CreateStreamRequestLipsyncModel { + type Raw = "Wav2Lip" | "SadTalker"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestOpenaiTtsModel.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestOpenaiTtsModel.ts new file mode 100644 index 0000000..4e825c7 --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestOpenaiTtsModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestOpenaiTtsModel: core.serialization.Schema< + serializers.CreateStreamRequestOpenaiTtsModel.Raw, + Gooey.CreateStreamRequestOpenaiTtsModel +> = core.serialization.enum_(["tts_1", "tts_1_hd"]); + +export declare namespace CreateStreamRequestOpenaiTtsModel { + type Raw = "tts_1" | "tts_1_hd"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestOpenaiVoiceName.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestOpenaiVoiceName.ts new file mode 100644 index 0000000..84cbb28 --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestOpenaiVoiceName.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestOpenaiVoiceName: core.serialization.Schema< + serializers.CreateStreamRequestOpenaiVoiceName.Raw, + Gooey.CreateStreamRequestOpenaiVoiceName +> = core.serialization.enum_(["alloy", "echo", "fable", "onyx", "nova", "shimmer"]); + +export declare namespace CreateStreamRequestOpenaiVoiceName { + type Raw = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestSelectedModel.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestSelectedModel.ts new file mode 100644 index 0000000..e8fef5f --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestSelectedModel: core.serialization.Schema< + serializers.CreateStreamRequestSelectedModel.Raw, + Gooey.CreateStreamRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace CreateStreamRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestTranslationModel.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestTranslationModel.ts new file mode 100644 index 0000000..27010bf --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestTranslationModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestTranslationModel: core.serialization.Schema< + serializers.CreateStreamRequestTranslationModel.Raw, + Gooey.CreateStreamRequestTranslationModel +> = core.serialization.enum_(["google", "ghana_nlp"]); + +export declare namespace CreateStreamRequestTranslationModel { + type Raw = "google" | "ghana_nlp"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestTtsProvider.ts b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestTtsProvider.ts new file mode 100644 index 0000000..8f4a2f1 --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/CreateStreamRequestTtsProvider.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; + +export const CreateStreamRequestTtsProvider: core.serialization.Schema< + serializers.CreateStreamRequestTtsProvider.Raw, + Gooey.CreateStreamRequestTtsProvider +> = core.serialization.enum_(["GOOGLE_TTS", "ELEVEN_LABS", "UBERDUCK", "BARK", "AZURE_TTS", "OPEN_AI"]); + +export declare namespace CreateStreamRequestTtsProvider { + type Raw = "GOOGLE_TTS" | "ELEVEN_LABS" | "UBERDUCK" | "BARK" | "AZURE_TTS" | "OPEN_AI"; +} diff --git a/src/serialization/resources/copilotIntegrations/types/VideoBotsStreamResponse.ts b/src/serialization/resources/copilotIntegrations/types/VideoBotsStreamResponse.ts new file mode 100644 index 0000000..f923038 --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/VideoBotsStreamResponse.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Gooey from "../../../../api/index"; +import * as core from "../../../../core"; +import { ConversationStart } from "../../../types/ConversationStart"; +import { RunStart } from "../../../types/RunStart"; +import { MessagePart } from "../../../types/MessagePart"; +import { FinalResponse } from "../../../types/FinalResponse"; +import { StreamError } from "../../../types/StreamError"; + +export const VideoBotsStreamResponse: core.serialization.Schema< + serializers.VideoBotsStreamResponse.Raw, + Gooey.VideoBotsStreamResponse +> = core.serialization.undiscriminatedUnion([ConversationStart, RunStart, MessagePart, FinalResponse, StreamError]); + +export declare namespace VideoBotsStreamResponse { + type Raw = ConversationStart.Raw | RunStart.Raw | MessagePart.Raw | FinalResponse.Raw | StreamError.Raw; +} diff --git a/src/serialization/resources/copilotIntegrations/types/index.ts b/src/serialization/resources/copilotIntegrations/types/index.ts new file mode 100644 index 0000000..5429f0e --- /dev/null +++ b/src/serialization/resources/copilotIntegrations/types/index.ts @@ -0,0 +1,10 @@ +export * from "./CreateStreamRequestSelectedModel"; +export * from "./CreateStreamRequestEmbeddingModel"; +export * from "./CreateStreamRequestCitationStyle"; +export * from "./CreateStreamRequestAsrModel"; +export * from "./CreateStreamRequestTranslationModel"; +export * from "./CreateStreamRequestLipsyncModel"; +export * from "./CreateStreamRequestTtsProvider"; +export * from "./CreateStreamRequestOpenaiVoiceName"; +export * from "./CreateStreamRequestOpenaiTtsModel"; +export * from "./VideoBotsStreamResponse"; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts new file mode 100644 index 0000000..bb324e6 --- /dev/null +++ b/src/serialization/resources/index.ts @@ -0,0 +1,5 @@ +export * as copilotIntegrations from "./copilotIntegrations"; +export * from "./copilotIntegrations/types"; +export * from "./copilotIntegrations/client/requests"; +export * as misc from "./misc"; +export * from "./misc/client/requests"; diff --git a/src/serialization/resources/misc/client/index.ts b/src/serialization/resources/misc/client/index.ts new file mode 100644 index 0000000..415726b --- /dev/null +++ b/src/serialization/resources/misc/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/misc/client/requests/BotBroadcastRequestModel.ts b/src/serialization/resources/misc/client/requests/BotBroadcastRequestModel.ts new file mode 100644 index 0000000..ac79261 --- /dev/null +++ b/src/serialization/resources/misc/client/requests/BotBroadcastRequestModel.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Gooey from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ReplyButton } from "../../../../types/ReplyButton"; +import { BotBroadcastFilters } from "../../../../types/BotBroadcastFilters"; + +export const BotBroadcastRequestModel: core.serialization.Schema< + serializers.BotBroadcastRequestModel.Raw, + Omit +> = core.serialization.object({ + text: core.serialization.string(), + audio: core.serialization.string().optional(), + video: core.serialization.string().optional(), + documents: core.serialization.list(core.serialization.string()).optional(), + buttons: core.serialization.list(ReplyButton).optional(), + filters: BotBroadcastFilters.optional(), +}); + +export declare namespace BotBroadcastRequestModel { + interface Raw { + text: string; + audio?: string | null; + video?: string | null; + documents?: string[] | null; + buttons?: ReplyButton.Raw[] | null; + filters?: BotBroadcastFilters.Raw | null; + } +} diff --git a/src/serialization/resources/misc/client/requests/index.ts b/src/serialization/resources/misc/client/requests/index.ts new file mode 100644 index 0000000..db5730c --- /dev/null +++ b/src/serialization/resources/misc/client/requests/index.ts @@ -0,0 +1 @@ +export { BotBroadcastRequestModel } from "./BotBroadcastRequestModel"; diff --git a/src/serialization/resources/misc/index.ts b/src/serialization/resources/misc/index.ts new file mode 100644 index 0000000..5ec7692 --- /dev/null +++ b/src/serialization/resources/misc/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/types/AggFunction.ts b/src/serialization/types/AggFunction.ts new file mode 100644 index 0000000..de26971 --- /dev/null +++ b/src/serialization/types/AggFunction.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Function } from "./Function"; + +export const AggFunction: core.serialization.ObjectSchema = + core.serialization.object({ + column: core.serialization.string().optional(), + function: Function, + }); + +export declare namespace AggFunction { + interface Raw { + column?: string | null; + function: Function.Raw; + } +} diff --git a/src/serialization/types/AggFunctionResult.ts b/src/serialization/types/AggFunctionResult.ts new file mode 100644 index 0000000..27a069c --- /dev/null +++ b/src/serialization/types/AggFunctionResult.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Function } from "./Function"; + +export const AggFunctionResult: core.serialization.ObjectSchema< + serializers.AggFunctionResult.Raw, + Gooey.AggFunctionResult +> = core.serialization.object({ + column: core.serialization.string(), + function: Function, + count: core.serialization.number(), + value: core.serialization.number(), +}); + +export declare namespace AggFunctionResult { + interface Raw { + column: string; + function: Function.Raw; + count: number; + value: number; + } +} diff --git a/src/serialization/types/AnimationPrompt.ts b/src/serialization/types/AnimationPrompt.ts new file mode 100644 index 0000000..7d69858 --- /dev/null +++ b/src/serialization/types/AnimationPrompt.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const AnimationPrompt: core.serialization.ObjectSchema = + core.serialization.object({ + frame: core.serialization.string(), + prompt: core.serialization.string(), + }); + +export declare namespace AnimationPrompt { + interface Raw { + frame: string; + prompt: string; + } +} diff --git a/src/serialization/types/AsrChunk.ts b/src/serialization/types/AsrChunk.ts new file mode 100644 index 0000000..a167444 --- /dev/null +++ b/src/serialization/types/AsrChunk.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const AsrChunk: core.serialization.ObjectSchema = + core.serialization.object({ + timestamp: core.serialization.list(core.serialization.unknown()), + text: core.serialization.string(), + speaker: core.serialization.number(), + }); + +export declare namespace AsrChunk { + interface Raw { + timestamp: unknown[]; + text: string; + speaker: number; + } +} diff --git a/src/serialization/types/AsrOutputJson.ts b/src/serialization/types/AsrOutputJson.ts new file mode 100644 index 0000000..214a843 --- /dev/null +++ b/src/serialization/types/AsrOutputJson.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { AsrChunk } from "./AsrChunk"; + +export const AsrOutputJson: core.serialization.ObjectSchema = + core.serialization.object({ + text: core.serialization.string(), + chunks: core.serialization.list(AsrChunk).optional(), + }); + +export declare namespace AsrOutputJson { + interface Raw { + text: string; + chunks?: AsrChunk.Raw[] | null; + } +} diff --git a/src/serialization/types/AsrPageOutput.ts b/src/serialization/types/AsrPageOutput.ts new file mode 100644 index 0000000..56c21d3 --- /dev/null +++ b/src/serialization/types/AsrPageOutput.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { AsrPageOutputOutputTextItem } from "./AsrPageOutputOutputTextItem"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const AsrPageOutput: core.serialization.ObjectSchema = + core.serialization.object({ + rawOutputText: core.serialization.property( + "raw_output_text", + core.serialization.list(core.serialization.string()).optional() + ), + outputText: core.serialization.property("output_text", core.serialization.list(AsrPageOutputOutputTextItem)), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), + }); + +export declare namespace AsrPageOutput { + interface Raw { + raw_output_text?: string[] | null; + output_text: AsrPageOutputOutputTextItem.Raw[]; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/AsrPageOutputOutputTextItem.ts b/src/serialization/types/AsrPageOutputOutputTextItem.ts new file mode 100644 index 0000000..99602ef --- /dev/null +++ b/src/serialization/types/AsrPageOutputOutputTextItem.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { AsrOutputJson } from "./AsrOutputJson"; + +export const AsrPageOutputOutputTextItem: core.serialization.Schema< + serializers.AsrPageOutputOutputTextItem.Raw, + Gooey.AsrPageOutputOutputTextItem +> = core.serialization.undiscriminatedUnion([core.serialization.string(), AsrOutputJson]); + +export declare namespace AsrPageOutputOutputTextItem { + type Raw = string | AsrOutputJson.Raw; +} diff --git a/src/serialization/types/AsrPageRequest.ts b/src/serialization/types/AsrPageRequest.ts new file mode 100644 index 0000000..821416f --- /dev/null +++ b/src/serialization/types/AsrPageRequest.ts @@ -0,0 +1,48 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { AsrPageRequestSelectedModel } from "./AsrPageRequestSelectedModel"; +import { AsrPageRequestTranslationModel } from "./AsrPageRequestTranslationModel"; +import { AsrPageRequestOutputFormat } from "./AsrPageRequestOutputFormat"; +import { RunSettings } from "./RunSettings"; + +export const AsrPageRequest: core.serialization.ObjectSchema = + core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + documents: core.serialization.list(core.serialization.string()), + selectedModel: core.serialization.property("selected_model", AsrPageRequestSelectedModel.optional()), + language: core.serialization.string().optional(), + translationModel: core.serialization.property("translation_model", AsrPageRequestTranslationModel.optional()), + outputFormat: core.serialization.property("output_format", AsrPageRequestOutputFormat.optional()), + googleTranslateTarget: core.serialization.property( + "google_translate_target", + core.serialization.string().optional() + ), + translationSource: core.serialization.property("translation_source", core.serialization.string().optional()), + translationTarget: core.serialization.property("translation_target", core.serialization.string().optional()), + glossaryDocument: core.serialization.property("glossary_document", core.serialization.string().optional()), + settings: RunSettings.optional(), + }); + +export declare namespace AsrPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + documents: string[]; + selected_model?: AsrPageRequestSelectedModel.Raw | null; + language?: string | null; + translation_model?: AsrPageRequestTranslationModel.Raw | null; + output_format?: AsrPageRequestOutputFormat.Raw | null; + google_translate_target?: string | null; + translation_source?: string | null; + translation_target?: string | null; + glossary_document?: string | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/AsrPageRequestOutputFormat.ts b/src/serialization/types/AsrPageRequestOutputFormat.ts new file mode 100644 index 0000000..0d8e85a --- /dev/null +++ b/src/serialization/types/AsrPageRequestOutputFormat.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const AsrPageRequestOutputFormat: core.serialization.Schema< + serializers.AsrPageRequestOutputFormat.Raw, + Gooey.AsrPageRequestOutputFormat +> = core.serialization.enum_(["text", "json", "srt", "vtt"]); + +export declare namespace AsrPageRequestOutputFormat { + type Raw = "text" | "json" | "srt" | "vtt"; +} diff --git a/src/serialization/types/AsrPageRequestSelectedModel.ts b/src/serialization/types/AsrPageRequestSelectedModel.ts new file mode 100644 index 0000000..4a0db95 --- /dev/null +++ b/src/serialization/types/AsrPageRequestSelectedModel.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const AsrPageRequestSelectedModel: core.serialization.Schema< + serializers.AsrPageRequestSelectedModel.Raw, + Gooey.AsrPageRequestSelectedModel +> = core.serialization.enum_([ + "whisper_large_v2", + "whisper_large_v3", + "whisper_hindi_large_v2", + "whisper_telugu_large_v2", + "nemo_english", + "nemo_hindi", + "vakyansh_bhojpuri", + "gcp_v1", + "usm", + "deepgram", + "azure", + "seamless_m4t", + "mms_1b_all", +]); + +export declare namespace AsrPageRequestSelectedModel { + type Raw = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; +} diff --git a/src/serialization/types/AsrPageRequestTranslationModel.ts b/src/serialization/types/AsrPageRequestTranslationModel.ts new file mode 100644 index 0000000..07dc52a --- /dev/null +++ b/src/serialization/types/AsrPageRequestTranslationModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const AsrPageRequestTranslationModel: core.serialization.Schema< + serializers.AsrPageRequestTranslationModel.Raw, + Gooey.AsrPageRequestTranslationModel +> = core.serialization.enum_(["google", "ghana_nlp"]); + +export declare namespace AsrPageRequestTranslationModel { + type Raw = "google" | "ghana_nlp"; +} diff --git a/src/serialization/types/AsrPageResponse.ts b/src/serialization/types/AsrPageResponse.ts new file mode 100644 index 0000000..8139b0f --- /dev/null +++ b/src/serialization/types/AsrPageResponse.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { AsrPageOutput } from "./AsrPageOutput"; + +export const AsrPageResponse: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: AsrPageOutput, + }); + +export declare namespace AsrPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: AsrPageOutput.Raw; + } +} diff --git a/src/serialization/types/AsrPageStatusResponse.ts b/src/serialization/types/AsrPageStatusResponse.ts new file mode 100644 index 0000000..04c3c64 --- /dev/null +++ b/src/serialization/types/AsrPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { AsrPageOutput } from "./AsrPageOutput"; + +export const AsrPageStatusResponse: core.serialization.ObjectSchema< + serializers.AsrPageStatusResponse.Raw, + Gooey.AsrPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: AsrPageOutput.optional(), +}); + +export declare namespace AsrPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: AsrPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/AsyncApiResponseModelV3.ts b/src/serialization/types/AsyncApiResponseModelV3.ts new file mode 100644 index 0000000..64812fd --- /dev/null +++ b/src/serialization/types/AsyncApiResponseModelV3.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const AsyncApiResponseModelV3: core.serialization.ObjectSchema< + serializers.AsyncApiResponseModelV3.Raw, + Gooey.AsyncApiResponseModelV3 +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + statusUrl: core.serialization.property("status_url", core.serialization.string()), +}); + +export declare namespace AsyncApiResponseModelV3 { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + status_url: string; + } +} diff --git a/src/serialization/types/BalanceResponse.ts b/src/serialization/types/BalanceResponse.ts new file mode 100644 index 0000000..0c85d84 --- /dev/null +++ b/src/serialization/types/BalanceResponse.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const BalanceResponse: core.serialization.ObjectSchema = + core.serialization.object({ + balance: core.serialization.number(), + }); + +export declare namespace BalanceResponse { + interface Raw { + balance: number; + } +} diff --git a/src/serialization/types/BotBroadcastFilters.ts b/src/serialization/types/BotBroadcastFilters.ts new file mode 100644 index 0000000..34313ae --- /dev/null +++ b/src/serialization/types/BotBroadcastFilters.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const BotBroadcastFilters: core.serialization.ObjectSchema< + serializers.BotBroadcastFilters.Raw, + Gooey.BotBroadcastFilters +> = core.serialization.object({ + waPhoneNumberIn: core.serialization.property( + "wa_phone_number__in", + core.serialization.list(core.serialization.string()).optional() + ), + slackUserIdIn: core.serialization.property( + "slack_user_id__in", + core.serialization.list(core.serialization.string()).optional() + ), + slackUserNameIcontains: core.serialization.property( + "slack_user_name__icontains", + core.serialization.string().optional() + ), + slackChannelIsPersonal: core.serialization.property( + "slack_channel_is_personal", + core.serialization.boolean().optional() + ), +}); + +export declare namespace BotBroadcastFilters { + interface Raw { + wa_phone_number__in?: string[] | null; + slack_user_id__in?: string[] | null; + slack_user_name__icontains?: string | null; + slack_channel_is_personal?: boolean | null; + } +} diff --git a/src/serialization/types/BulkEvalPageOutput.ts b/src/serialization/types/BulkEvalPageOutput.ts new file mode 100644 index 0000000..78dea86 --- /dev/null +++ b/src/serialization/types/BulkEvalPageOutput.ts @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { AggFunctionResult } from "./AggFunctionResult"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const BulkEvalPageOutput: core.serialization.ObjectSchema< + serializers.BulkEvalPageOutput.Raw, + Gooey.BulkEvalPageOutput +> = core.serialization.object({ + outputDocuments: core.serialization.property( + "output_documents", + core.serialization.list(core.serialization.string()) + ), + finalPrompts: core.serialization.property( + "final_prompts", + core.serialization.list(core.serialization.list(core.serialization.string())).optional() + ), + aggregations: core.serialization.list(core.serialization.list(AggFunctionResult)).optional(), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace BulkEvalPageOutput { + interface Raw { + output_documents: string[]; + final_prompts?: string[][] | null; + aggregations?: AggFunctionResult.Raw[][] | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/BulkEvalPageRequest.ts b/src/serialization/types/BulkEvalPageRequest.ts new file mode 100644 index 0000000..2aed553 --- /dev/null +++ b/src/serialization/types/BulkEvalPageRequest.ts @@ -0,0 +1,47 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { BulkEvalPageRequestSelectedModel } from "./BulkEvalPageRequestSelectedModel"; +import { EvalPrompt } from "./EvalPrompt"; +import { AggFunction } from "./AggFunction"; +import { RunSettings } from "./RunSettings"; + +export const BulkEvalPageRequest: core.serialization.ObjectSchema< + serializers.BulkEvalPageRequest.Raw, + Gooey.BulkEvalPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + selectedModel: core.serialization.property("selected_model", BulkEvalPageRequestSelectedModel.optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + documents: core.serialization.list(core.serialization.string()), + evalPrompts: core.serialization.property("eval_prompts", core.serialization.list(EvalPrompt).optional()), + aggFunctions: core.serialization.property("agg_functions", core.serialization.list(AggFunction).optional()), + settings: RunSettings.optional(), +}); + +export declare namespace BulkEvalPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + selected_model?: BulkEvalPageRequestSelectedModel.Raw | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + documents: string[]; + eval_prompts?: EvalPrompt.Raw[] | null; + agg_functions?: AggFunction.Raw[] | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/BulkEvalPageRequestSelectedModel.ts b/src/serialization/types/BulkEvalPageRequestSelectedModel.ts new file mode 100644 index 0000000..2edba2e --- /dev/null +++ b/src/serialization/types/BulkEvalPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const BulkEvalPageRequestSelectedModel: core.serialization.Schema< + serializers.BulkEvalPageRequestSelectedModel.Raw, + Gooey.BulkEvalPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace BulkEvalPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/BulkEvalPageResponse.ts b/src/serialization/types/BulkEvalPageResponse.ts new file mode 100644 index 0000000..28a3027 --- /dev/null +++ b/src/serialization/types/BulkEvalPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { BulkEvalPageOutput } from "./BulkEvalPageOutput"; + +export const BulkEvalPageResponse: core.serialization.ObjectSchema< + serializers.BulkEvalPageResponse.Raw, + Gooey.BulkEvalPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: BulkEvalPageOutput, +}); + +export declare namespace BulkEvalPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: BulkEvalPageOutput.Raw; + } +} diff --git a/src/serialization/types/BulkEvalPageStatusResponse.ts b/src/serialization/types/BulkEvalPageStatusResponse.ts new file mode 100644 index 0000000..dffda70 --- /dev/null +++ b/src/serialization/types/BulkEvalPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { BulkEvalPageOutput } from "./BulkEvalPageOutput"; + +export const BulkEvalPageStatusResponse: core.serialization.ObjectSchema< + serializers.BulkEvalPageStatusResponse.Raw, + Gooey.BulkEvalPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: BulkEvalPageOutput.optional(), +}); + +export declare namespace BulkEvalPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: BulkEvalPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/BulkRunnerPageOutput.ts b/src/serialization/types/BulkRunnerPageOutput.ts new file mode 100644 index 0000000..19e430d --- /dev/null +++ b/src/serialization/types/BulkRunnerPageOutput.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const BulkRunnerPageOutput: core.serialization.ObjectSchema< + serializers.BulkRunnerPageOutput.Raw, + Gooey.BulkRunnerPageOutput +> = core.serialization.object({ + outputDocuments: core.serialization.property( + "output_documents", + core.serialization.list(core.serialization.string()) + ), + evalRuns: core.serialization.property("eval_runs", core.serialization.list(core.serialization.string()).optional()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace BulkRunnerPageOutput { + interface Raw { + output_documents: string[]; + eval_runs?: string[] | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/BulkRunnerPageRequest.ts b/src/serialization/types/BulkRunnerPageRequest.ts new file mode 100644 index 0000000..269dd85 --- /dev/null +++ b/src/serialization/types/BulkRunnerPageRequest.ts @@ -0,0 +1,42 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { RunSettings } from "./RunSettings"; + +export const BulkRunnerPageRequest: core.serialization.ObjectSchema< + serializers.BulkRunnerPageRequest.Raw, + Gooey.BulkRunnerPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + documents: core.serialization.list(core.serialization.string()), + runUrls: core.serialization.property("run_urls", core.serialization.list(core.serialization.string())), + inputColumns: core.serialization.property( + "input_columns", + core.serialization.record(core.serialization.string(), core.serialization.string()) + ), + outputColumns: core.serialization.property( + "output_columns", + core.serialization.record(core.serialization.string(), core.serialization.string()) + ), + evalUrls: core.serialization.property("eval_urls", core.serialization.list(core.serialization.string()).optional()), + settings: RunSettings.optional(), +}); + +export declare namespace BulkRunnerPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + documents: string[]; + run_urls: string[]; + input_columns: Record; + output_columns: Record; + eval_urls?: string[] | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/BulkRunnerPageResponse.ts b/src/serialization/types/BulkRunnerPageResponse.ts new file mode 100644 index 0000000..c59e693 --- /dev/null +++ b/src/serialization/types/BulkRunnerPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { BulkRunnerPageOutput } from "./BulkRunnerPageOutput"; + +export const BulkRunnerPageResponse: core.serialization.ObjectSchema< + serializers.BulkRunnerPageResponse.Raw, + Gooey.BulkRunnerPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: BulkRunnerPageOutput, +}); + +export declare namespace BulkRunnerPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: BulkRunnerPageOutput.Raw; + } +} diff --git a/src/serialization/types/BulkRunnerPageStatusResponse.ts b/src/serialization/types/BulkRunnerPageStatusResponse.ts new file mode 100644 index 0000000..b755874 --- /dev/null +++ b/src/serialization/types/BulkRunnerPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { BulkRunnerPageOutput } from "./BulkRunnerPageOutput"; + +export const BulkRunnerPageStatusResponse: core.serialization.ObjectSchema< + serializers.BulkRunnerPageStatusResponse.Raw, + Gooey.BulkRunnerPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: BulkRunnerPageOutput.optional(), +}); + +export declare namespace BulkRunnerPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: BulkRunnerPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/ButtonPressed.ts b/src/serialization/types/ButtonPressed.ts new file mode 100644 index 0000000..cd0b20c --- /dev/null +++ b/src/serialization/types/ButtonPressed.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const ButtonPressed: core.serialization.ObjectSchema = + core.serialization.object({ + buttonId: core.serialization.property("button_id", core.serialization.string()), + contextMsgId: core.serialization.property("context_msg_id", core.serialization.string()), + }); + +export declare namespace ButtonPressed { + interface Raw { + button_id: string; + context_msg_id: string; + } +} diff --git a/src/serialization/types/CalledFunctionResponse.ts b/src/serialization/types/CalledFunctionResponse.ts new file mode 100644 index 0000000..8e065f9 --- /dev/null +++ b/src/serialization/types/CalledFunctionResponse.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Trigger } from "./Trigger"; + +export const CalledFunctionResponse: core.serialization.ObjectSchema< + serializers.CalledFunctionResponse.Raw, + Gooey.CalledFunctionResponse +> = core.serialization.object({ + url: core.serialization.string(), + trigger: Trigger, + returnValue: core.serialization.property("return_value", core.serialization.unknown().optional()), +}); + +export declare namespace CalledFunctionResponse { + interface Raw { + url: string; + trigger: Trigger.Raw; + return_value?: unknown | null; + } +} diff --git a/src/serialization/types/ChatCompletionContentPartImageParam.ts b/src/serialization/types/ChatCompletionContentPartImageParam.ts new file mode 100644 index 0000000..603ea28 --- /dev/null +++ b/src/serialization/types/ChatCompletionContentPartImageParam.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ImageUrl } from "./ImageUrl"; + +export const ChatCompletionContentPartImageParam: core.serialization.ObjectSchema< + serializers.ChatCompletionContentPartImageParam.Raw, + Gooey.ChatCompletionContentPartImageParam +> = core.serialization.object({ + imageUrl: core.serialization.property("image_url", ImageUrl.optional()), +}); + +export declare namespace ChatCompletionContentPartImageParam { + interface Raw { + image_url?: ImageUrl.Raw | null; + } +} diff --git a/src/serialization/types/ChatCompletionContentPartTextParam.ts b/src/serialization/types/ChatCompletionContentPartTextParam.ts new file mode 100644 index 0000000..221d337 --- /dev/null +++ b/src/serialization/types/ChatCompletionContentPartTextParam.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const ChatCompletionContentPartTextParam: core.serialization.ObjectSchema< + serializers.ChatCompletionContentPartTextParam.Raw, + Gooey.ChatCompletionContentPartTextParam +> = core.serialization.object({ + text: core.serialization.string().optional(), +}); + +export declare namespace ChatCompletionContentPartTextParam { + interface Raw { + text?: string | null; + } +} diff --git a/src/serialization/types/ChyronPlantPageOutput.ts b/src/serialization/types/ChyronPlantPageOutput.ts new file mode 100644 index 0000000..f58130c --- /dev/null +++ b/src/serialization/types/ChyronPlantPageOutput.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const ChyronPlantPageOutput: core.serialization.ObjectSchema< + serializers.ChyronPlantPageOutput.Raw, + Gooey.ChyronPlantPageOutput +> = core.serialization.object({ + midiTranslation: core.serialization.property("midi_translation", core.serialization.string()), + chyronOutput: core.serialization.property("chyron_output", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace ChyronPlantPageOutput { + interface Raw { + midi_translation: string; + chyron_output: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/ChyronPlantPageRequest.ts b/src/serialization/types/ChyronPlantPageRequest.ts new file mode 100644 index 0000000..217f3da --- /dev/null +++ b/src/serialization/types/ChyronPlantPageRequest.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { RunSettings } from "./RunSettings"; + +export const ChyronPlantPageRequest: core.serialization.ObjectSchema< + serializers.ChyronPlantPageRequest.Raw, + Gooey.ChyronPlantPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + midiNotes: core.serialization.property("midi_notes", core.serialization.string()), + midiNotesPrompt: core.serialization.property("midi_notes_prompt", core.serialization.string().optional()), + chyronPrompt: core.serialization.property("chyron_prompt", core.serialization.string().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace ChyronPlantPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + midi_notes: string; + midi_notes_prompt?: string | null; + chyron_prompt?: string | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/ChyronPlantPageResponse.ts b/src/serialization/types/ChyronPlantPageResponse.ts new file mode 100644 index 0000000..7571b46 --- /dev/null +++ b/src/serialization/types/ChyronPlantPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ChyronPlantPageOutput } from "./ChyronPlantPageOutput"; + +export const ChyronPlantPageResponse: core.serialization.ObjectSchema< + serializers.ChyronPlantPageResponse.Raw, + Gooey.ChyronPlantPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: ChyronPlantPageOutput, +}); + +export declare namespace ChyronPlantPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: ChyronPlantPageOutput.Raw; + } +} diff --git a/src/serialization/types/ChyronPlantPageStatusResponse.ts b/src/serialization/types/ChyronPlantPageStatusResponse.ts new file mode 100644 index 0000000..6432fcb --- /dev/null +++ b/src/serialization/types/ChyronPlantPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { ChyronPlantPageOutput } from "./ChyronPlantPageOutput"; + +export const ChyronPlantPageStatusResponse: core.serialization.ObjectSchema< + serializers.ChyronPlantPageStatusResponse.Raw, + Gooey.ChyronPlantPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: ChyronPlantPageOutput.optional(), +}); + +export declare namespace ChyronPlantPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: ChyronPlantPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/CompareLlmPageOutput.ts b/src/serialization/types/CompareLlmPageOutput.ts new file mode 100644 index 0000000..973314f --- /dev/null +++ b/src/serialization/types/CompareLlmPageOutput.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const CompareLlmPageOutput: core.serialization.ObjectSchema< + serializers.CompareLlmPageOutput.Raw, + Gooey.CompareLlmPageOutput +> = core.serialization.object({ + outputText: core.serialization.property( + "output_text", + core.serialization.record(core.serialization.string(), core.serialization.list(core.serialization.string())) + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace CompareLlmPageOutput { + interface Raw { + output_text: Record; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/CompareLlmPageRequest.ts b/src/serialization/types/CompareLlmPageRequest.ts new file mode 100644 index 0000000..5a39a7f --- /dev/null +++ b/src/serialization/types/CompareLlmPageRequest.ts @@ -0,0 +1,50 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { CompareLlmPageRequestSelectedModelsItem } from "./CompareLlmPageRequestSelectedModelsItem"; +import { CompareLlmPageRequestResponseFormatType } from "./CompareLlmPageRequestResponseFormatType"; +import { RunSettings } from "./RunSettings"; + +export const CompareLlmPageRequest: core.serialization.ObjectSchema< + serializers.CompareLlmPageRequest.Raw, + Gooey.CompareLlmPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputPrompt: core.serialization.property("input_prompt", core.serialization.string().optional()), + selectedModels: core.serialization.property( + "selected_models", + core.serialization.list(CompareLlmPageRequestSelectedModelsItem).optional() + ), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + responseFormatType: core.serialization.property( + "response_format_type", + CompareLlmPageRequestResponseFormatType.optional() + ), + settings: RunSettings.optional(), +}); + +export declare namespace CompareLlmPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_prompt?: string | null; + selected_models?: CompareLlmPageRequestSelectedModelsItem.Raw[] | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + response_format_type?: CompareLlmPageRequestResponseFormatType.Raw | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/CompareLlmPageRequestResponseFormatType.ts b/src/serialization/types/CompareLlmPageRequestResponseFormatType.ts new file mode 100644 index 0000000..ea3dabc --- /dev/null +++ b/src/serialization/types/CompareLlmPageRequestResponseFormatType.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const CompareLlmPageRequestResponseFormatType: core.serialization.Schema< + serializers.CompareLlmPageRequestResponseFormatType.Raw, + Gooey.CompareLlmPageRequestResponseFormatType +> = core.serialization.enum_(["text", "json_object"]); + +export declare namespace CompareLlmPageRequestResponseFormatType { + type Raw = "text" | "json_object"; +} diff --git a/src/serialization/types/CompareLlmPageRequestSelectedModelsItem.ts b/src/serialization/types/CompareLlmPageRequestSelectedModelsItem.ts new file mode 100644 index 0000000..9950785 --- /dev/null +++ b/src/serialization/types/CompareLlmPageRequestSelectedModelsItem.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const CompareLlmPageRequestSelectedModelsItem: core.serialization.Schema< + serializers.CompareLlmPageRequestSelectedModelsItem.Raw, + Gooey.CompareLlmPageRequestSelectedModelsItem +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace CompareLlmPageRequestSelectedModelsItem { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/CompareLlmPageResponse.ts b/src/serialization/types/CompareLlmPageResponse.ts new file mode 100644 index 0000000..449b709 --- /dev/null +++ b/src/serialization/types/CompareLlmPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CompareLlmPageOutput } from "./CompareLlmPageOutput"; + +export const CompareLlmPageResponse: core.serialization.ObjectSchema< + serializers.CompareLlmPageResponse.Raw, + Gooey.CompareLlmPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: CompareLlmPageOutput, +}); + +export declare namespace CompareLlmPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: CompareLlmPageOutput.Raw; + } +} diff --git a/src/serialization/types/CompareLlmPageStatusResponse.ts b/src/serialization/types/CompareLlmPageStatusResponse.ts new file mode 100644 index 0000000..df6d682 --- /dev/null +++ b/src/serialization/types/CompareLlmPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { CompareLlmPageOutput } from "./CompareLlmPageOutput"; + +export const CompareLlmPageStatusResponse: core.serialization.ObjectSchema< + serializers.CompareLlmPageStatusResponse.Raw, + Gooey.CompareLlmPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: CompareLlmPageOutput.optional(), +}); + +export declare namespace CompareLlmPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: CompareLlmPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/CompareText2ImgPageOutput.ts b/src/serialization/types/CompareText2ImgPageOutput.ts new file mode 100644 index 0000000..0283456 --- /dev/null +++ b/src/serialization/types/CompareText2ImgPageOutput.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const CompareText2ImgPageOutput: core.serialization.ObjectSchema< + serializers.CompareText2ImgPageOutput.Raw, + Gooey.CompareText2ImgPageOutput +> = core.serialization.object({ + outputImages: core.serialization.property( + "output_images", + core.serialization.record(core.serialization.string(), core.serialization.list(core.serialization.string())) + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace CompareText2ImgPageOutput { + interface Raw { + output_images: Record; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/CompareText2ImgPageRequest.ts b/src/serialization/types/CompareText2ImgPageRequest.ts new file mode 100644 index 0000000..9f179b8 --- /dev/null +++ b/src/serialization/types/CompareText2ImgPageRequest.ts @@ -0,0 +1,61 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { CompareText2ImgPageRequestSelectedModelsItem } from "./CompareText2ImgPageRequestSelectedModelsItem"; +import { Scheduler } from "./Scheduler"; +import { RunSettings } from "./RunSettings"; + +export const CompareText2ImgPageRequest: core.serialization.ObjectSchema< + serializers.CompareText2ImgPageRequest.Raw, + Gooey.CompareText2ImgPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + negativePrompt: core.serialization.property("negative_prompt", core.serialization.string().optional()), + outputWidth: core.serialization.property("output_width", core.serialization.number().optional()), + outputHeight: core.serialization.property("output_height", core.serialization.number().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + dallE3Quality: core.serialization.property("dall_e_3_quality", core.serialization.string().optional()), + dallE3Style: core.serialization.property("dall_e_3_style", core.serialization.string().optional()), + guidanceScale: core.serialization.property("guidance_scale", core.serialization.number().optional()), + seed: core.serialization.number().optional(), + sd2Upscaling: core.serialization.property("sd_2_upscaling", core.serialization.boolean().optional()), + selectedModels: core.serialization.property( + "selected_models", + core.serialization.list(CompareText2ImgPageRequestSelectedModelsItem).optional() + ), + scheduler: Scheduler.optional(), + editInstruction: core.serialization.property("edit_instruction", core.serialization.string().optional()), + imageGuidanceScale: core.serialization.property("image_guidance_scale", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace CompareText2ImgPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + text_prompt: string; + negative_prompt?: string | null; + output_width?: number | null; + output_height?: number | null; + num_outputs?: number | null; + quality?: number | null; + dall_e_3_quality?: string | null; + dall_e_3_style?: string | null; + guidance_scale?: number | null; + seed?: number | null; + sd_2_upscaling?: boolean | null; + selected_models?: CompareText2ImgPageRequestSelectedModelsItem.Raw[] | null; + scheduler?: Scheduler.Raw | null; + edit_instruction?: string | null; + image_guidance_scale?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/CompareText2ImgPageRequestSelectedModelsItem.ts b/src/serialization/types/CompareText2ImgPageRequestSelectedModelsItem.ts new file mode 100644 index 0000000..42d06bf --- /dev/null +++ b/src/serialization/types/CompareText2ImgPageRequestSelectedModelsItem.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const CompareText2ImgPageRequestSelectedModelsItem: core.serialization.Schema< + serializers.CompareText2ImgPageRequestSelectedModelsItem.Raw, + Gooey.CompareText2ImgPageRequestSelectedModelsItem +> = core.serialization.enum_([ + "dream_shaper", + "dreamlike_2", + "sd_2", + "sd_1_5", + "dall_e", + "dall_e_3", + "openjourney_2", + "openjourney", + "analog_diffusion", + "protogen_5_3", + "jack_qiao", + "rodent_diffusion_1_5", + "deepfloyd_if", +]); + +export declare namespace CompareText2ImgPageRequestSelectedModelsItem { + type Raw = + | "dream_shaper" + | "dreamlike_2" + | "sd_2" + | "sd_1_5" + | "dall_e" + | "dall_e_3" + | "openjourney_2" + | "openjourney" + | "analog_diffusion" + | "protogen_5_3" + | "jack_qiao" + | "rodent_diffusion_1_5" + | "deepfloyd_if"; +} diff --git a/src/serialization/types/CompareText2ImgPageResponse.ts b/src/serialization/types/CompareText2ImgPageResponse.ts new file mode 100644 index 0000000..c2484df --- /dev/null +++ b/src/serialization/types/CompareText2ImgPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CompareText2ImgPageOutput } from "./CompareText2ImgPageOutput"; + +export const CompareText2ImgPageResponse: core.serialization.ObjectSchema< + serializers.CompareText2ImgPageResponse.Raw, + Gooey.CompareText2ImgPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: CompareText2ImgPageOutput, +}); + +export declare namespace CompareText2ImgPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: CompareText2ImgPageOutput.Raw; + } +} diff --git a/src/serialization/types/CompareText2ImgPageStatusResponse.ts b/src/serialization/types/CompareText2ImgPageStatusResponse.ts new file mode 100644 index 0000000..3453298 --- /dev/null +++ b/src/serialization/types/CompareText2ImgPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { CompareText2ImgPageOutput } from "./CompareText2ImgPageOutput"; + +export const CompareText2ImgPageStatusResponse: core.serialization.ObjectSchema< + serializers.CompareText2ImgPageStatusResponse.Raw, + Gooey.CompareText2ImgPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: CompareText2ImgPageOutput.optional(), +}); + +export declare namespace CompareText2ImgPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: CompareText2ImgPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/CompareUpscalerPageOutput.ts b/src/serialization/types/CompareUpscalerPageOutput.ts new file mode 100644 index 0000000..282ee64 --- /dev/null +++ b/src/serialization/types/CompareUpscalerPageOutput.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const CompareUpscalerPageOutput: core.serialization.ObjectSchema< + serializers.CompareUpscalerPageOutput.Raw, + Gooey.CompareUpscalerPageOutput +> = core.serialization.object({ + outputImages: core.serialization.property( + "output_images", + core.serialization.record(core.serialization.string(), core.serialization.string()).optional() + ), + outputVideos: core.serialization.property( + "output_videos", + core.serialization.record(core.serialization.string(), core.serialization.string()).optional() + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace CompareUpscalerPageOutput { + interface Raw { + output_images?: Record | null; + output_videos?: Record | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/CompareUpscalerPageRequest.ts b/src/serialization/types/CompareUpscalerPageRequest.ts new file mode 100644 index 0000000..55a7d48 --- /dev/null +++ b/src/serialization/types/CompareUpscalerPageRequest.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { CompareUpscalerPageRequestSelectedModelsItem } from "./CompareUpscalerPageRequestSelectedModelsItem"; +import { RunSettings } from "./RunSettings"; + +export const CompareUpscalerPageRequest: core.serialization.ObjectSchema< + serializers.CompareUpscalerPageRequest.Raw, + Gooey.CompareUpscalerPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputImage: core.serialization.property("input_image", core.serialization.string().optional()), + inputVideo: core.serialization.property("input_video", core.serialization.string().optional()), + scale: core.serialization.number(), + selectedModels: core.serialization.property( + "selected_models", + core.serialization.list(CompareUpscalerPageRequestSelectedModelsItem).optional() + ), + selectedBgModel: core.serialization.property( + "selected_bg_model", + core.serialization.stringLiteral("real_esrgan_x2").optional() + ), + settings: RunSettings.optional(), +}); + +export declare namespace CompareUpscalerPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_image?: string | null; + input_video?: string | null; + scale: number; + selected_models?: CompareUpscalerPageRequestSelectedModelsItem.Raw[] | null; + selected_bg_model?: "real_esrgan_x2" | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/CompareUpscalerPageRequestSelectedModelsItem.ts b/src/serialization/types/CompareUpscalerPageRequestSelectedModelsItem.ts new file mode 100644 index 0000000..34fcdc9 --- /dev/null +++ b/src/serialization/types/CompareUpscalerPageRequestSelectedModelsItem.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const CompareUpscalerPageRequestSelectedModelsItem: core.serialization.Schema< + serializers.CompareUpscalerPageRequestSelectedModelsItem.Raw, + Gooey.CompareUpscalerPageRequestSelectedModelsItem +> = core.serialization.enum_(["gfpgan_1_4", "real_esrgan_x2", "sd_x4", "real_esrgan", "gfpgan"]); + +export declare namespace CompareUpscalerPageRequestSelectedModelsItem { + type Raw = "gfpgan_1_4" | "real_esrgan_x2" | "sd_x4" | "real_esrgan" | "gfpgan"; +} diff --git a/src/serialization/types/CompareUpscalerPageResponse.ts b/src/serialization/types/CompareUpscalerPageResponse.ts new file mode 100644 index 0000000..a6aeb76 --- /dev/null +++ b/src/serialization/types/CompareUpscalerPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CompareUpscalerPageOutput } from "./CompareUpscalerPageOutput"; + +export const CompareUpscalerPageResponse: core.serialization.ObjectSchema< + serializers.CompareUpscalerPageResponse.Raw, + Gooey.CompareUpscalerPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: CompareUpscalerPageOutput, +}); + +export declare namespace CompareUpscalerPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: CompareUpscalerPageOutput.Raw; + } +} diff --git a/src/serialization/types/CompareUpscalerPageStatusResponse.ts b/src/serialization/types/CompareUpscalerPageStatusResponse.ts new file mode 100644 index 0000000..0d2df98 --- /dev/null +++ b/src/serialization/types/CompareUpscalerPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { CompareUpscalerPageOutput } from "./CompareUpscalerPageOutput"; + +export const CompareUpscalerPageStatusResponse: core.serialization.ObjectSchema< + serializers.CompareUpscalerPageStatusResponse.Raw, + Gooey.CompareUpscalerPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: CompareUpscalerPageOutput.optional(), +}); + +export declare namespace CompareUpscalerPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: CompareUpscalerPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/ConsoleLogs.ts b/src/serialization/types/ConsoleLogs.ts new file mode 100644 index 0000000..2180904 --- /dev/null +++ b/src/serialization/types/ConsoleLogs.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Level } from "./Level"; + +export const ConsoleLogs: core.serialization.ObjectSchema = + core.serialization.object({ + level: Level, + message: core.serialization.string(), + }); + +export declare namespace ConsoleLogs { + interface Raw { + level: Level.Raw; + message: string; + } +} diff --git a/src/serialization/types/Content.ts b/src/serialization/types/Content.ts new file mode 100644 index 0000000..13126f2 --- /dev/null +++ b/src/serialization/types/Content.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ConversationEntryContentItem } from "./ConversationEntryContentItem"; + +export const Content: core.serialization.Schema = + core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.list(ConversationEntryContentItem), + ]); + +export declare namespace Content { + type Raw = string | ConversationEntryContentItem.Raw[]; +} diff --git a/src/serialization/types/ConversationEntry.ts b/src/serialization/types/ConversationEntry.ts new file mode 100644 index 0000000..8499252 --- /dev/null +++ b/src/serialization/types/ConversationEntry.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Role } from "./Role"; +import { Content } from "./Content"; + +export const ConversationEntry: core.serialization.ObjectSchema< + serializers.ConversationEntry.Raw, + Gooey.ConversationEntry +> = core.serialization.object({ + role: Role, + content: Content, + displayName: core.serialization.property("display_name", core.serialization.string().optional()), +}); + +export declare namespace ConversationEntry { + interface Raw { + role: Role.Raw; + content: Content.Raw; + display_name?: string | null; + } +} diff --git a/src/serialization/types/ConversationEntryContentItem.ts b/src/serialization/types/ConversationEntryContentItem.ts new file mode 100644 index 0000000..17c6ddc --- /dev/null +++ b/src/serialization/types/ConversationEntryContentItem.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ChatCompletionContentPartTextParam } from "./ChatCompletionContentPartTextParam"; +import { ChatCompletionContentPartImageParam } from "./ChatCompletionContentPartImageParam"; + +export const ConversationEntryContentItem: core.serialization.Schema< + serializers.ConversationEntryContentItem.Raw, + Gooey.ConversationEntryContentItem +> = core.serialization + .union("type", { + text: ChatCompletionContentPartTextParam, + image_url: ChatCompletionContentPartImageParam, + }) + .transform({ + transform: (value) => value, + untransform: (value) => value, + }); + +export declare namespace ConversationEntryContentItem { + type Raw = ConversationEntryContentItem.Text | ConversationEntryContentItem.ImageUrl; + + interface Text extends ChatCompletionContentPartTextParam.Raw { + type: "text"; + } + + interface ImageUrl extends ChatCompletionContentPartImageParam.Raw { + type: "image_url"; + } +} diff --git a/src/serialization/types/ConversationStart.ts b/src/serialization/types/ConversationStart.ts new file mode 100644 index 0000000..802b57f --- /dev/null +++ b/src/serialization/types/ConversationStart.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const ConversationStart: core.serialization.ObjectSchema< + serializers.ConversationStart.Raw, + Gooey.ConversationStart +> = core.serialization.object({ + conversationId: core.serialization.property("conversation_id", core.serialization.string()), + userId: core.serialization.property("user_id", core.serialization.string()), + userMessageId: core.serialization.property("user_message_id", core.serialization.string()), + botMessageId: core.serialization.property("bot_message_id", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + type: core.serialization.string().optional(), +}); + +export declare namespace ConversationStart { + interface Raw { + conversation_id: string; + user_id: string; + user_message_id: string; + bot_message_id: string; + created_at: string; + type?: string | null; + } +} diff --git a/src/serialization/types/CreateStreamResponse.ts b/src/serialization/types/CreateStreamResponse.ts new file mode 100644 index 0000000..fe10989 --- /dev/null +++ b/src/serialization/types/CreateStreamResponse.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const CreateStreamResponse: core.serialization.ObjectSchema< + serializers.CreateStreamResponse.Raw, + Gooey.CreateStreamResponse +> = core.serialization.object({ + streamUrl: core.serialization.property("stream_url", core.serialization.string()), +}); + +export declare namespace CreateStreamResponse { + interface Raw { + stream_url: string; + } +} diff --git a/src/serialization/types/DeforumSdPageOutput.ts b/src/serialization/types/DeforumSdPageOutput.ts new file mode 100644 index 0000000..deb5653 --- /dev/null +++ b/src/serialization/types/DeforumSdPageOutput.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const DeforumSdPageOutput: core.serialization.ObjectSchema< + serializers.DeforumSdPageOutput.Raw, + Gooey.DeforumSdPageOutput +> = core.serialization.object({ + outputVideo: core.serialization.property("output_video", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace DeforumSdPageOutput { + interface Raw { + output_video: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/DeforumSdPageRequest.ts b/src/serialization/types/DeforumSdPageRequest.ts new file mode 100644 index 0000000..1f939b0 --- /dev/null +++ b/src/serialization/types/DeforumSdPageRequest.ts @@ -0,0 +1,52 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { AnimationPrompt } from "./AnimationPrompt"; +import { DeforumSdPageRequestSelectedModel } from "./DeforumSdPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const DeforumSdPageRequest: core.serialization.ObjectSchema< + serializers.DeforumSdPageRequest.Raw, + Gooey.DeforumSdPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + animationPrompts: core.serialization.property("animation_prompts", core.serialization.list(AnimationPrompt)), + maxFrames: core.serialization.property("max_frames", core.serialization.number().optional()), + selectedModel: core.serialization.property("selected_model", DeforumSdPageRequestSelectedModel.optional()), + animationMode: core.serialization.property("animation_mode", core.serialization.string().optional()), + zoom: core.serialization.string().optional(), + translationX: core.serialization.property("translation_x", core.serialization.string().optional()), + translationY: core.serialization.property("translation_y", core.serialization.string().optional()), + rotation3DX: core.serialization.property("rotation_3d_x", core.serialization.string().optional()), + rotation3DY: core.serialization.property("rotation_3d_y", core.serialization.string().optional()), + rotation3DZ: core.serialization.property("rotation_3d_z", core.serialization.string().optional()), + fps: core.serialization.number().optional(), + seed: core.serialization.number().optional(), + settings: RunSettings.optional(), +}); + +export declare namespace DeforumSdPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + animation_prompts: AnimationPrompt.Raw[]; + max_frames?: number | null; + selected_model?: DeforumSdPageRequestSelectedModel.Raw | null; + animation_mode?: string | null; + zoom?: string | null; + translation_x?: string | null; + translation_y?: string | null; + rotation_3d_x?: string | null; + rotation_3d_y?: string | null; + rotation_3d_z?: string | null; + fps?: number | null; + seed?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/DeforumSdPageRequestSelectedModel.ts b/src/serialization/types/DeforumSdPageRequestSelectedModel.ts new file mode 100644 index 0000000..0ba01af --- /dev/null +++ b/src/serialization/types/DeforumSdPageRequestSelectedModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DeforumSdPageRequestSelectedModel: core.serialization.Schema< + serializers.DeforumSdPageRequestSelectedModel.Raw, + Gooey.DeforumSdPageRequestSelectedModel +> = core.serialization.enum_(["protogen_2_2", "epicdream"]); + +export declare namespace DeforumSdPageRequestSelectedModel { + type Raw = "protogen_2_2" | "epicdream"; +} diff --git a/src/serialization/types/DeforumSdPageResponse.ts b/src/serialization/types/DeforumSdPageResponse.ts new file mode 100644 index 0000000..f1ecf1c --- /dev/null +++ b/src/serialization/types/DeforumSdPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { DeforumSdPageOutput } from "./DeforumSdPageOutput"; + +export const DeforumSdPageResponse: core.serialization.ObjectSchema< + serializers.DeforumSdPageResponse.Raw, + Gooey.DeforumSdPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: DeforumSdPageOutput, +}); + +export declare namespace DeforumSdPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: DeforumSdPageOutput.Raw; + } +} diff --git a/src/serialization/types/DeforumSdPageStatusResponse.ts b/src/serialization/types/DeforumSdPageStatusResponse.ts new file mode 100644 index 0000000..e819a55 --- /dev/null +++ b/src/serialization/types/DeforumSdPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { DeforumSdPageOutput } from "./DeforumSdPageOutput"; + +export const DeforumSdPageStatusResponse: core.serialization.ObjectSchema< + serializers.DeforumSdPageStatusResponse.Raw, + Gooey.DeforumSdPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: DeforumSdPageOutput.optional(), +}); + +export declare namespace DeforumSdPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: DeforumSdPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/Detail.ts b/src/serialization/types/Detail.ts new file mode 100644 index 0000000..51e6cc9 --- /dev/null +++ b/src/serialization/types/Detail.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Detail: core.serialization.Schema = core.serialization.enum_([ + "auto", + "low", + "high", +]); + +export declare namespace Detail { + type Raw = "auto" | "low" | "high"; +} diff --git a/src/serialization/types/DocExtractPageOutput.ts b/src/serialization/types/DocExtractPageOutput.ts new file mode 100644 index 0000000..9fa25f6 --- /dev/null +++ b/src/serialization/types/DocExtractPageOutput.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const DocExtractPageOutput: core.serialization.ObjectSchema< + serializers.DocExtractPageOutput.Raw, + Gooey.DocExtractPageOutput +> = core.serialization.object({ + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace DocExtractPageOutput { + interface Raw { + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/DocExtractPageRequest.ts b/src/serialization/types/DocExtractPageRequest.ts new file mode 100644 index 0000000..856a339 --- /dev/null +++ b/src/serialization/types/DocExtractPageRequest.ts @@ -0,0 +1,58 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { DocExtractPageRequestSelectedAsrModel } from "./DocExtractPageRequestSelectedAsrModel"; +import { DocExtractPageRequestSelectedModel } from "./DocExtractPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const DocExtractPageRequest: core.serialization.ObjectSchema< + serializers.DocExtractPageRequest.Raw, + Gooey.DocExtractPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + documents: core.serialization.list(core.serialization.string()), + sheetUrl: core.serialization.property("sheet_url", core.serialization.string().optional()), + selectedAsrModel: core.serialization.property( + "selected_asr_model", + DocExtractPageRequestSelectedAsrModel.optional() + ), + googleTranslateTarget: core.serialization.property( + "google_translate_target", + core.serialization.string().optional() + ), + glossaryDocument: core.serialization.property("glossary_document", core.serialization.string().optional()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", DocExtractPageRequestSelectedModel.optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace DocExtractPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + documents: string[]; + sheet_url?: string | null; + selected_asr_model?: DocExtractPageRequestSelectedAsrModel.Raw | null; + google_translate_target?: string | null; + glossary_document?: string | null; + task_instructions?: string | null; + selected_model?: DocExtractPageRequestSelectedModel.Raw | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/DocExtractPageRequestSelectedAsrModel.ts b/src/serialization/types/DocExtractPageRequestSelectedAsrModel.ts new file mode 100644 index 0000000..6b45a95 --- /dev/null +++ b/src/serialization/types/DocExtractPageRequestSelectedAsrModel.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DocExtractPageRequestSelectedAsrModel: core.serialization.Schema< + serializers.DocExtractPageRequestSelectedAsrModel.Raw, + Gooey.DocExtractPageRequestSelectedAsrModel +> = core.serialization.enum_([ + "whisper_large_v2", + "whisper_large_v3", + "whisper_hindi_large_v2", + "whisper_telugu_large_v2", + "nemo_english", + "nemo_hindi", + "vakyansh_bhojpuri", + "gcp_v1", + "usm", + "deepgram", + "azure", + "seamless_m4t", + "mms_1b_all", +]); + +export declare namespace DocExtractPageRequestSelectedAsrModel { + type Raw = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; +} diff --git a/src/serialization/types/DocExtractPageRequestSelectedModel.ts b/src/serialization/types/DocExtractPageRequestSelectedModel.ts new file mode 100644 index 0000000..657c135 --- /dev/null +++ b/src/serialization/types/DocExtractPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DocExtractPageRequestSelectedModel: core.serialization.Schema< + serializers.DocExtractPageRequestSelectedModel.Raw, + Gooey.DocExtractPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace DocExtractPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/DocExtractPageResponse.ts b/src/serialization/types/DocExtractPageResponse.ts new file mode 100644 index 0000000..72d3388 --- /dev/null +++ b/src/serialization/types/DocExtractPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { DocExtractPageOutput } from "./DocExtractPageOutput"; + +export const DocExtractPageResponse: core.serialization.ObjectSchema< + serializers.DocExtractPageResponse.Raw, + Gooey.DocExtractPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: DocExtractPageOutput, +}); + +export declare namespace DocExtractPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: DocExtractPageOutput.Raw; + } +} diff --git a/src/serialization/types/DocExtractPageStatusResponse.ts b/src/serialization/types/DocExtractPageStatusResponse.ts new file mode 100644 index 0000000..12f9260 --- /dev/null +++ b/src/serialization/types/DocExtractPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { DocExtractPageOutput } from "./DocExtractPageOutput"; + +export const DocExtractPageStatusResponse: core.serialization.ObjectSchema< + serializers.DocExtractPageStatusResponse.Raw, + Gooey.DocExtractPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: DocExtractPageOutput.optional(), +}); + +export declare namespace DocExtractPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: DocExtractPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/DocSearchPageOutput.ts b/src/serialization/types/DocSearchPageOutput.ts new file mode 100644 index 0000000..f3570b4 --- /dev/null +++ b/src/serialization/types/DocSearchPageOutput.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { SearchReference } from "./SearchReference"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const DocSearchPageOutput: core.serialization.ObjectSchema< + serializers.DocSearchPageOutput.Raw, + Gooey.DocSearchPageOutput +> = core.serialization.object({ + outputText: core.serialization.property("output_text", core.serialization.list(core.serialization.string())), + references: core.serialization.list(SearchReference), + finalPrompt: core.serialization.property("final_prompt", core.serialization.string()), + finalSearchQuery: core.serialization.property("final_search_query", core.serialization.string().optional()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace DocSearchPageOutput { + interface Raw { + output_text: string[]; + references: SearchReference.Raw[]; + final_prompt: string; + final_search_query?: string | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/DocSearchPageRequest.ts b/src/serialization/types/DocSearchPageRequest.ts new file mode 100644 index 0000000..69ecda2 --- /dev/null +++ b/src/serialization/types/DocSearchPageRequest.ts @@ -0,0 +1,66 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { DocSearchPageRequestKeywordQuery } from "./DocSearchPageRequestKeywordQuery"; +import { DocSearchPageRequestEmbeddingModel } from "./DocSearchPageRequestEmbeddingModel"; +import { DocSearchPageRequestSelectedModel } from "./DocSearchPageRequestSelectedModel"; +import { DocSearchPageRequestCitationStyle } from "./DocSearchPageRequestCitationStyle"; +import { RunSettings } from "./RunSettings"; + +export const DocSearchPageRequest: core.serialization.ObjectSchema< + serializers.DocSearchPageRequest.Raw, + Gooey.DocSearchPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + searchQuery: core.serialization.property("search_query", core.serialization.string()), + keywordQuery: core.serialization.property("keyword_query", DocSearchPageRequestKeywordQuery.optional()), + documents: core.serialization.list(core.serialization.string()).optional(), + maxReferences: core.serialization.property("max_references", core.serialization.number().optional()), + maxContextWords: core.serialization.property("max_context_words", core.serialization.number().optional()), + scrollJump: core.serialization.property("scroll_jump", core.serialization.number().optional()), + docExtractUrl: core.serialization.property("doc_extract_url", core.serialization.string().optional()), + embeddingModel: core.serialization.property("embedding_model", DocSearchPageRequestEmbeddingModel.optional()), + denseWeight: core.serialization.property("dense_weight", core.serialization.number().optional()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + queryInstructions: core.serialization.property("query_instructions", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", DocSearchPageRequestSelectedModel.optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + citationStyle: core.serialization.property("citation_style", DocSearchPageRequestCitationStyle.optional()), + settings: RunSettings.optional(), +}); + +export declare namespace DocSearchPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + search_query: string; + keyword_query?: DocSearchPageRequestKeywordQuery.Raw | null; + documents?: string[] | null; + max_references?: number | null; + max_context_words?: number | null; + scroll_jump?: number | null; + doc_extract_url?: string | null; + embedding_model?: DocSearchPageRequestEmbeddingModel.Raw | null; + dense_weight?: number | null; + task_instructions?: string | null; + query_instructions?: string | null; + selected_model?: DocSearchPageRequestSelectedModel.Raw | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + citation_style?: DocSearchPageRequestCitationStyle.Raw | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/DocSearchPageRequestCitationStyle.ts b/src/serialization/types/DocSearchPageRequestCitationStyle.ts new file mode 100644 index 0000000..d702905 --- /dev/null +++ b/src/serialization/types/DocSearchPageRequestCitationStyle.ts @@ -0,0 +1,49 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DocSearchPageRequestCitationStyle: core.serialization.Schema< + serializers.DocSearchPageRequestCitationStyle.Raw, + Gooey.DocSearchPageRequestCitationStyle +> = core.serialization.enum_([ + "number", + "title", + "url", + "symbol", + "markdown", + "html", + "slack_mrkdwn", + "plaintext", + "number_markdown", + "number_html", + "number_slack_mrkdwn", + "number_plaintext", + "symbol_markdown", + "symbol_html", + "symbol_slack_mrkdwn", + "symbol_plaintext", +]); + +export declare namespace DocSearchPageRequestCitationStyle { + type Raw = + | "number" + | "title" + | "url" + | "symbol" + | "markdown" + | "html" + | "slack_mrkdwn" + | "plaintext" + | "number_markdown" + | "number_html" + | "number_slack_mrkdwn" + | "number_plaintext" + | "symbol_markdown" + | "symbol_html" + | "symbol_slack_mrkdwn" + | "symbol_plaintext"; +} diff --git a/src/serialization/types/DocSearchPageRequestEmbeddingModel.ts b/src/serialization/types/DocSearchPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..5cafaef --- /dev/null +++ b/src/serialization/types/DocSearchPageRequestEmbeddingModel.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DocSearchPageRequestEmbeddingModel: core.serialization.Schema< + serializers.DocSearchPageRequestEmbeddingModel.Raw, + Gooey.DocSearchPageRequestEmbeddingModel +> = core.serialization.enum_([ + "openai_3_large", + "openai_3_small", + "openai_ada_2", + "e5_large_v2", + "e5_base_v2", + "multilingual_e5_base", + "multilingual_e5_large", + "gte_large", + "gte_base", +]); + +export declare namespace DocSearchPageRequestEmbeddingModel { + type Raw = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; +} diff --git a/src/serialization/types/DocSearchPageRequestKeywordQuery.ts b/src/serialization/types/DocSearchPageRequestKeywordQuery.ts new file mode 100644 index 0000000..21bde39 --- /dev/null +++ b/src/serialization/types/DocSearchPageRequestKeywordQuery.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DocSearchPageRequestKeywordQuery: core.serialization.Schema< + serializers.DocSearchPageRequestKeywordQuery.Raw, + Gooey.DocSearchPageRequestKeywordQuery +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.list(core.serialization.string()), +]); + +export declare namespace DocSearchPageRequestKeywordQuery { + type Raw = string | string[]; +} diff --git a/src/serialization/types/DocSearchPageRequestSelectedModel.ts b/src/serialization/types/DocSearchPageRequestSelectedModel.ts new file mode 100644 index 0000000..0e2df09 --- /dev/null +++ b/src/serialization/types/DocSearchPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DocSearchPageRequestSelectedModel: core.serialization.Schema< + serializers.DocSearchPageRequestSelectedModel.Raw, + Gooey.DocSearchPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace DocSearchPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/DocSearchPageResponse.ts b/src/serialization/types/DocSearchPageResponse.ts new file mode 100644 index 0000000..aabb5fb --- /dev/null +++ b/src/serialization/types/DocSearchPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { DocSearchPageOutput } from "./DocSearchPageOutput"; + +export const DocSearchPageResponse: core.serialization.ObjectSchema< + serializers.DocSearchPageResponse.Raw, + Gooey.DocSearchPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: DocSearchPageOutput, +}); + +export declare namespace DocSearchPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: DocSearchPageOutput.Raw; + } +} diff --git a/src/serialization/types/DocSearchPageStatusResponse.ts b/src/serialization/types/DocSearchPageStatusResponse.ts new file mode 100644 index 0000000..abe29fd --- /dev/null +++ b/src/serialization/types/DocSearchPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { DocSearchPageOutput } from "./DocSearchPageOutput"; + +export const DocSearchPageStatusResponse: core.serialization.ObjectSchema< + serializers.DocSearchPageStatusResponse.Raw, + Gooey.DocSearchPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: DocSearchPageOutput.optional(), +}); + +export declare namespace DocSearchPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: DocSearchPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/DocSummaryPageOutput.ts b/src/serialization/types/DocSummaryPageOutput.ts new file mode 100644 index 0000000..f923fdd --- /dev/null +++ b/src/serialization/types/DocSummaryPageOutput.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const DocSummaryPageOutput: core.serialization.ObjectSchema< + serializers.DocSummaryPageOutput.Raw, + Gooey.DocSummaryPageOutput +> = core.serialization.object({ + outputText: core.serialization.property("output_text", core.serialization.list(core.serialization.string())), + promptTree: core.serialization.property( + "prompt_tree", + core.serialization.list(core.serialization.lazyObject(() => serializers.PromptTreeNode)).optional() + ), + finalPrompt: core.serialization.property("final_prompt", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace DocSummaryPageOutput { + interface Raw { + output_text: string[]; + prompt_tree?: serializers.PromptTreeNode.Raw[] | null; + final_prompt: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/DocSummaryPageRequest.ts b/src/serialization/types/DocSummaryPageRequest.ts new file mode 100644 index 0000000..4856826 --- /dev/null +++ b/src/serialization/types/DocSummaryPageRequest.ts @@ -0,0 +1,58 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { DocSummaryPageRequestSelectedModel } from "./DocSummaryPageRequestSelectedModel"; +import { DocSummaryPageRequestSelectedAsrModel } from "./DocSummaryPageRequestSelectedAsrModel"; +import { RunSettings } from "./RunSettings"; + +export const DocSummaryPageRequest: core.serialization.ObjectSchema< + serializers.DocSummaryPageRequest.Raw, + Gooey.DocSummaryPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + documents: core.serialization.list(core.serialization.string()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + mergeInstructions: core.serialization.property("merge_instructions", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", DocSummaryPageRequestSelectedModel.optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + chainType: core.serialization.property("chain_type", core.serialization.stringLiteral("map_reduce").optional()), + selectedAsrModel: core.serialization.property( + "selected_asr_model", + DocSummaryPageRequestSelectedAsrModel.optional() + ), + googleTranslateTarget: core.serialization.property( + "google_translate_target", + core.serialization.string().optional() + ), + settings: RunSettings.optional(), +}); + +export declare namespace DocSummaryPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + documents: string[]; + task_instructions?: string | null; + merge_instructions?: string | null; + selected_model?: DocSummaryPageRequestSelectedModel.Raw | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + chain_type?: "map_reduce" | null; + selected_asr_model?: DocSummaryPageRequestSelectedAsrModel.Raw | null; + google_translate_target?: string | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/DocSummaryPageRequestSelectedAsrModel.ts b/src/serialization/types/DocSummaryPageRequestSelectedAsrModel.ts new file mode 100644 index 0000000..0d9d962 --- /dev/null +++ b/src/serialization/types/DocSummaryPageRequestSelectedAsrModel.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DocSummaryPageRequestSelectedAsrModel: core.serialization.Schema< + serializers.DocSummaryPageRequestSelectedAsrModel.Raw, + Gooey.DocSummaryPageRequestSelectedAsrModel +> = core.serialization.enum_([ + "whisper_large_v2", + "whisper_large_v3", + "whisper_hindi_large_v2", + "whisper_telugu_large_v2", + "nemo_english", + "nemo_hindi", + "vakyansh_bhojpuri", + "gcp_v1", + "usm", + "deepgram", + "azure", + "seamless_m4t", + "mms_1b_all", +]); + +export declare namespace DocSummaryPageRequestSelectedAsrModel { + type Raw = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; +} diff --git a/src/serialization/types/DocSummaryPageRequestSelectedModel.ts b/src/serialization/types/DocSummaryPageRequestSelectedModel.ts new file mode 100644 index 0000000..dafd3ff --- /dev/null +++ b/src/serialization/types/DocSummaryPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const DocSummaryPageRequestSelectedModel: core.serialization.Schema< + serializers.DocSummaryPageRequestSelectedModel.Raw, + Gooey.DocSummaryPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace DocSummaryPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/DocSummaryPageResponse.ts b/src/serialization/types/DocSummaryPageResponse.ts new file mode 100644 index 0000000..7cc99d2 --- /dev/null +++ b/src/serialization/types/DocSummaryPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { DocSummaryPageOutput } from "./DocSummaryPageOutput"; + +export const DocSummaryPageResponse: core.serialization.ObjectSchema< + serializers.DocSummaryPageResponse.Raw, + Gooey.DocSummaryPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: DocSummaryPageOutput, +}); + +export declare namespace DocSummaryPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: DocSummaryPageOutput.Raw; + } +} diff --git a/src/serialization/types/DocSummaryPageStatusResponse.ts b/src/serialization/types/DocSummaryPageStatusResponse.ts new file mode 100644 index 0000000..80687de --- /dev/null +++ b/src/serialization/types/DocSummaryPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { DocSummaryPageOutput } from "./DocSummaryPageOutput"; + +export const DocSummaryPageStatusResponse: core.serialization.ObjectSchema< + serializers.DocSummaryPageStatusResponse.Raw, + Gooey.DocSummaryPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: DocSummaryPageOutput.optional(), +}); + +export declare namespace DocSummaryPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: DocSummaryPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/EmailFaceInpaintingPageOutput.ts b/src/serialization/types/EmailFaceInpaintingPageOutput.ts new file mode 100644 index 0000000..08f3f0d --- /dev/null +++ b/src/serialization/types/EmailFaceInpaintingPageOutput.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const EmailFaceInpaintingPageOutput: core.serialization.ObjectSchema< + serializers.EmailFaceInpaintingPageOutput.Raw, + Gooey.EmailFaceInpaintingPageOutput +> = core.serialization.object({ + inputImage: core.serialization.property("input_image", core.serialization.string()), + resizedImage: core.serialization.property("resized_image", core.serialization.string()), + faceMask: core.serialization.property("face_mask", core.serialization.string()), + diffusionImages: core.serialization.property( + "diffusion_images", + core.serialization.list(core.serialization.string()) + ), + outputImages: core.serialization.property("output_images", core.serialization.list(core.serialization.string())), + emailSent: core.serialization.property("email_sent", core.serialization.boolean().optional()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace EmailFaceInpaintingPageOutput { + interface Raw { + input_image: string; + resized_image: string; + face_mask: string; + diffusion_images: string[]; + output_images: string[]; + email_sent?: boolean | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/EmailFaceInpaintingPageRequest.ts b/src/serialization/types/EmailFaceInpaintingPageRequest.ts new file mode 100644 index 0000000..ba4cb4c --- /dev/null +++ b/src/serialization/types/EmailFaceInpaintingPageRequest.ts @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { EmailFaceInpaintingPageRequestSelectedModel } from "./EmailFaceInpaintingPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const EmailFaceInpaintingPageRequest: core.serialization.ObjectSchema< + serializers.EmailFaceInpaintingPageRequest.Raw, + Gooey.EmailFaceInpaintingPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + emailAddress: core.serialization.property("email_address", core.serialization.string().optional()), + twitterHandle: core.serialization.property("twitter_handle", core.serialization.string().optional()), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + faceScale: core.serialization.property("face_scale", core.serialization.number().optional()), + facePosX: core.serialization.property("face_pos_x", core.serialization.number().optional()), + facePosY: core.serialization.property("face_pos_y", core.serialization.number().optional()), + selectedModel: core.serialization.property( + "selected_model", + EmailFaceInpaintingPageRequestSelectedModel.optional() + ), + negativePrompt: core.serialization.property("negative_prompt", core.serialization.string().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + upscaleFactor: core.serialization.property("upscale_factor", core.serialization.number().optional()), + outputWidth: core.serialization.property("output_width", core.serialization.number().optional()), + outputHeight: core.serialization.property("output_height", core.serialization.number().optional()), + guidanceScale: core.serialization.property("guidance_scale", core.serialization.number().optional()), + shouldSendEmail: core.serialization.property("should_send_email", core.serialization.boolean().optional()), + emailFrom: core.serialization.property("email_from", core.serialization.string().optional()), + emailCc: core.serialization.property("email_cc", core.serialization.string().optional()), + emailBcc: core.serialization.property("email_bcc", core.serialization.string().optional()), + emailSubject: core.serialization.property("email_subject", core.serialization.string().optional()), + emailBody: core.serialization.property("email_body", core.serialization.string().optional()), + emailBodyEnableHtml: core.serialization.property("email_body_enable_html", core.serialization.boolean().optional()), + fallbackEmailBody: core.serialization.property("fallback_email_body", core.serialization.string().optional()), + seed: core.serialization.number().optional(), + settings: RunSettings.optional(), +}); + +export declare namespace EmailFaceInpaintingPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + email_address?: string | null; + twitter_handle?: string | null; + text_prompt: string; + face_scale?: number | null; + face_pos_x?: number | null; + face_pos_y?: number | null; + selected_model?: EmailFaceInpaintingPageRequestSelectedModel.Raw | null; + negative_prompt?: string | null; + num_outputs?: number | null; + quality?: number | null; + upscale_factor?: number | null; + output_width?: number | null; + output_height?: number | null; + guidance_scale?: number | null; + should_send_email?: boolean | null; + email_from?: string | null; + email_cc?: string | null; + email_bcc?: string | null; + email_subject?: string | null; + email_body?: string | null; + email_body_enable_html?: boolean | null; + fallback_email_body?: string | null; + seed?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/EmailFaceInpaintingPageRequestSelectedModel.ts b/src/serialization/types/EmailFaceInpaintingPageRequestSelectedModel.ts new file mode 100644 index 0000000..5bf57e5 --- /dev/null +++ b/src/serialization/types/EmailFaceInpaintingPageRequestSelectedModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const EmailFaceInpaintingPageRequestSelectedModel: core.serialization.Schema< + serializers.EmailFaceInpaintingPageRequestSelectedModel.Raw, + Gooey.EmailFaceInpaintingPageRequestSelectedModel +> = core.serialization.enum_(["sd_2", "runway_ml", "dall_e", "jack_qiao"]); + +export declare namespace EmailFaceInpaintingPageRequestSelectedModel { + type Raw = "sd_2" | "runway_ml" | "dall_e" | "jack_qiao"; +} diff --git a/src/serialization/types/EmailFaceInpaintingPageResponse.ts b/src/serialization/types/EmailFaceInpaintingPageResponse.ts new file mode 100644 index 0000000..3c26112 --- /dev/null +++ b/src/serialization/types/EmailFaceInpaintingPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { EmailFaceInpaintingPageOutput } from "./EmailFaceInpaintingPageOutput"; + +export const EmailFaceInpaintingPageResponse: core.serialization.ObjectSchema< + serializers.EmailFaceInpaintingPageResponse.Raw, + Gooey.EmailFaceInpaintingPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: EmailFaceInpaintingPageOutput, +}); + +export declare namespace EmailFaceInpaintingPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: EmailFaceInpaintingPageOutput.Raw; + } +} diff --git a/src/serialization/types/EmailFaceInpaintingPageStatusResponse.ts b/src/serialization/types/EmailFaceInpaintingPageStatusResponse.ts new file mode 100644 index 0000000..dc5659b --- /dev/null +++ b/src/serialization/types/EmailFaceInpaintingPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { EmailFaceInpaintingPageOutput } from "./EmailFaceInpaintingPageOutput"; + +export const EmailFaceInpaintingPageStatusResponse: core.serialization.ObjectSchema< + serializers.EmailFaceInpaintingPageStatusResponse.Raw, + Gooey.EmailFaceInpaintingPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: EmailFaceInpaintingPageOutput.optional(), +}); + +export declare namespace EmailFaceInpaintingPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: EmailFaceInpaintingPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/EmbeddingsPageOutput.ts b/src/serialization/types/EmbeddingsPageOutput.ts new file mode 100644 index 0000000..560bd29 --- /dev/null +++ b/src/serialization/types/EmbeddingsPageOutput.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const EmbeddingsPageOutput: core.serialization.ObjectSchema< + serializers.EmbeddingsPageOutput.Raw, + Gooey.EmbeddingsPageOutput +> = core.serialization.object({ + embeddings: core.serialization.list(core.serialization.list(core.serialization.number())), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace EmbeddingsPageOutput { + interface Raw { + embeddings: number[][]; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/EmbeddingsPageRequest.ts b/src/serialization/types/EmbeddingsPageRequest.ts new file mode 100644 index 0000000..042dba9 --- /dev/null +++ b/src/serialization/types/EmbeddingsPageRequest.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { EmbeddingsPageRequestSelectedModel } from "./EmbeddingsPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const EmbeddingsPageRequest: core.serialization.ObjectSchema< + serializers.EmbeddingsPageRequest.Raw, + Gooey.EmbeddingsPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + texts: core.serialization.list(core.serialization.string()), + selectedModel: core.serialization.property("selected_model", EmbeddingsPageRequestSelectedModel.optional()), + settings: RunSettings.optional(), +}); + +export declare namespace EmbeddingsPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + texts: string[]; + selected_model?: EmbeddingsPageRequestSelectedModel.Raw | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/EmbeddingsPageRequestSelectedModel.ts b/src/serialization/types/EmbeddingsPageRequestSelectedModel.ts new file mode 100644 index 0000000..3145479 --- /dev/null +++ b/src/serialization/types/EmbeddingsPageRequestSelectedModel.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const EmbeddingsPageRequestSelectedModel: core.serialization.Schema< + serializers.EmbeddingsPageRequestSelectedModel.Raw, + Gooey.EmbeddingsPageRequestSelectedModel +> = core.serialization.enum_([ + "openai_3_large", + "openai_3_small", + "openai_ada_2", + "e5_large_v2", + "e5_base_v2", + "multilingual_e5_base", + "multilingual_e5_large", + "gte_large", + "gte_base", +]); + +export declare namespace EmbeddingsPageRequestSelectedModel { + type Raw = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; +} diff --git a/src/serialization/types/EmbeddingsPageResponse.ts b/src/serialization/types/EmbeddingsPageResponse.ts new file mode 100644 index 0000000..5444894 --- /dev/null +++ b/src/serialization/types/EmbeddingsPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { EmbeddingsPageOutput } from "./EmbeddingsPageOutput"; + +export const EmbeddingsPageResponse: core.serialization.ObjectSchema< + serializers.EmbeddingsPageResponse.Raw, + Gooey.EmbeddingsPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: EmbeddingsPageOutput, +}); + +export declare namespace EmbeddingsPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: EmbeddingsPageOutput.Raw; + } +} diff --git a/src/serialization/types/EmbeddingsPageStatusResponse.ts b/src/serialization/types/EmbeddingsPageStatusResponse.ts new file mode 100644 index 0000000..c889580 --- /dev/null +++ b/src/serialization/types/EmbeddingsPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { EmbeddingsPageOutput } from "./EmbeddingsPageOutput"; + +export const EmbeddingsPageStatusResponse: core.serialization.ObjectSchema< + serializers.EmbeddingsPageStatusResponse.Raw, + Gooey.EmbeddingsPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: EmbeddingsPageOutput.optional(), +}); + +export declare namespace EmbeddingsPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: EmbeddingsPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/EvalPrompt.ts b/src/serialization/types/EvalPrompt.ts new file mode 100644 index 0000000..e0d245d --- /dev/null +++ b/src/serialization/types/EvalPrompt.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const EvalPrompt: core.serialization.ObjectSchema = + core.serialization.object({ + name: core.serialization.string(), + prompt: core.serialization.string(), + }); + +export declare namespace EvalPrompt { + interface Raw { + name: string; + prompt: string; + } +} diff --git a/src/serialization/types/FaceInpaintingPageOutput.ts b/src/serialization/types/FaceInpaintingPageOutput.ts new file mode 100644 index 0000000..7151901 --- /dev/null +++ b/src/serialization/types/FaceInpaintingPageOutput.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const FaceInpaintingPageOutput: core.serialization.ObjectSchema< + serializers.FaceInpaintingPageOutput.Raw, + Gooey.FaceInpaintingPageOutput +> = core.serialization.object({ + resizedImage: core.serialization.property("resized_image", core.serialization.string()), + faceMask: core.serialization.property("face_mask", core.serialization.string()), + diffusionImages: core.serialization.property( + "diffusion_images", + core.serialization.list(core.serialization.string()) + ), + outputImages: core.serialization.property("output_images", core.serialization.list(core.serialization.string())), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace FaceInpaintingPageOutput { + interface Raw { + resized_image: string; + face_mask: string; + diffusion_images: string[]; + output_images: string[]; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/FaceInpaintingPageRequest.ts b/src/serialization/types/FaceInpaintingPageRequest.ts new file mode 100644 index 0000000..ce02ddd --- /dev/null +++ b/src/serialization/types/FaceInpaintingPageRequest.ts @@ -0,0 +1,55 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { FaceInpaintingPageRequestSelectedModel } from "./FaceInpaintingPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const FaceInpaintingPageRequest: core.serialization.ObjectSchema< + serializers.FaceInpaintingPageRequest.Raw, + Gooey.FaceInpaintingPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputImage: core.serialization.property("input_image", core.serialization.string()), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + faceScale: core.serialization.property("face_scale", core.serialization.number().optional()), + facePosX: core.serialization.property("face_pos_x", core.serialization.number().optional()), + facePosY: core.serialization.property("face_pos_y", core.serialization.number().optional()), + selectedModel: core.serialization.property("selected_model", FaceInpaintingPageRequestSelectedModel.optional()), + negativePrompt: core.serialization.property("negative_prompt", core.serialization.string().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + upscaleFactor: core.serialization.property("upscale_factor", core.serialization.number().optional()), + outputWidth: core.serialization.property("output_width", core.serialization.number().optional()), + outputHeight: core.serialization.property("output_height", core.serialization.number().optional()), + guidanceScale: core.serialization.property("guidance_scale", core.serialization.number().optional()), + seed: core.serialization.number().optional(), + settings: RunSettings.optional(), +}); + +export declare namespace FaceInpaintingPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_image: string; + text_prompt: string; + face_scale?: number | null; + face_pos_x?: number | null; + face_pos_y?: number | null; + selected_model?: FaceInpaintingPageRequestSelectedModel.Raw | null; + negative_prompt?: string | null; + num_outputs?: number | null; + quality?: number | null; + upscale_factor?: number | null; + output_width?: number | null; + output_height?: number | null; + guidance_scale?: number | null; + seed?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/FaceInpaintingPageRequestSelectedModel.ts b/src/serialization/types/FaceInpaintingPageRequestSelectedModel.ts new file mode 100644 index 0000000..7b9a9a3 --- /dev/null +++ b/src/serialization/types/FaceInpaintingPageRequestSelectedModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const FaceInpaintingPageRequestSelectedModel: core.serialization.Schema< + serializers.FaceInpaintingPageRequestSelectedModel.Raw, + Gooey.FaceInpaintingPageRequestSelectedModel +> = core.serialization.enum_(["sd_2", "runway_ml", "dall_e", "jack_qiao"]); + +export declare namespace FaceInpaintingPageRequestSelectedModel { + type Raw = "sd_2" | "runway_ml" | "dall_e" | "jack_qiao"; +} diff --git a/src/serialization/types/FaceInpaintingPageResponse.ts b/src/serialization/types/FaceInpaintingPageResponse.ts new file mode 100644 index 0000000..560c03b --- /dev/null +++ b/src/serialization/types/FaceInpaintingPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { FaceInpaintingPageOutput } from "./FaceInpaintingPageOutput"; + +export const FaceInpaintingPageResponse: core.serialization.ObjectSchema< + serializers.FaceInpaintingPageResponse.Raw, + Gooey.FaceInpaintingPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: FaceInpaintingPageOutput, +}); + +export declare namespace FaceInpaintingPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: FaceInpaintingPageOutput.Raw; + } +} diff --git a/src/serialization/types/FaceInpaintingPageStatusResponse.ts b/src/serialization/types/FaceInpaintingPageStatusResponse.ts new file mode 100644 index 0000000..906052d --- /dev/null +++ b/src/serialization/types/FaceInpaintingPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { FaceInpaintingPageOutput } from "./FaceInpaintingPageOutput"; + +export const FaceInpaintingPageStatusResponse: core.serialization.ObjectSchema< + serializers.FaceInpaintingPageStatusResponse.Raw, + Gooey.FaceInpaintingPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: FaceInpaintingPageOutput.optional(), +}); + +export declare namespace FaceInpaintingPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: FaceInpaintingPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/FailedReponseModelV2.ts b/src/serialization/types/FailedReponseModelV2.ts new file mode 100644 index 0000000..31fcacd --- /dev/null +++ b/src/serialization/types/FailedReponseModelV2.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { FailedResponseDetail } from "./FailedResponseDetail"; + +export const FailedReponseModelV2: core.serialization.ObjectSchema< + serializers.FailedReponseModelV2.Raw, + Gooey.FailedReponseModelV2 +> = core.serialization.object({ + detail: FailedResponseDetail, +}); + +export declare namespace FailedReponseModelV2 { + interface Raw { + detail: FailedResponseDetail.Raw; + } +} diff --git a/src/serialization/types/FailedResponseDetail.ts b/src/serialization/types/FailedResponseDetail.ts new file mode 100644 index 0000000..495530d --- /dev/null +++ b/src/serialization/types/FailedResponseDetail.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const FailedResponseDetail: core.serialization.ObjectSchema< + serializers.FailedResponseDetail.Raw, + Gooey.FailedResponseDetail +> = core.serialization.object({ + id: core.serialization.string().optional(), + url: core.serialization.string().optional(), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + error: core.serialization.string().optional(), +}); + +export declare namespace FailedResponseDetail { + interface Raw { + id?: string | null; + url?: string | null; + created_at?: string | null; + error?: string | null; + } +} diff --git a/src/serialization/types/FinalResponse.ts b/src/serialization/types/FinalResponse.ts new file mode 100644 index 0000000..f268c47 --- /dev/null +++ b/src/serialization/types/FinalResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { ResponseModel } from "./ResponseModel"; + +export const FinalResponse: core.serialization.ObjectSchema = + core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: ResponseModel.optional(), + type: core.serialization.string().optional(), + }); + +export declare namespace FinalResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: ResponseModel.Raw | null; + type?: string | null; + } +} diff --git a/src/serialization/types/Function.ts b/src/serialization/types/Function.ts new file mode 100644 index 0000000..2d849f3 --- /dev/null +++ b/src/serialization/types/Function.ts @@ -0,0 +1,46 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Function: core.serialization.Schema = core.serialization.enum_([ + "mean", + "median", + "min", + "max", + "sum", + "cumsum", + "prod", + "cumprod", + "std", + "var", + "first", + "last", + "count", + "cumcount", + "nunique", + "rank", +]); + +export declare namespace Function { + type Raw = + | "mean" + | "median" + | "min" + | "max" + | "sum" + | "cumsum" + | "prod" + | "cumprod" + | "std" + | "var" + | "first" + | "last" + | "count" + | "cumcount" + | "nunique" + | "rank"; +} diff --git a/src/serialization/types/FunctionsPageOutput.ts b/src/serialization/types/FunctionsPageOutput.ts new file mode 100644 index 0000000..5b5bc0f --- /dev/null +++ b/src/serialization/types/FunctionsPageOutput.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ConsoleLogs } from "./ConsoleLogs"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const FunctionsPageOutput: core.serialization.ObjectSchema< + serializers.FunctionsPageOutput.Raw, + Gooey.FunctionsPageOutput +> = core.serialization.object({ + returnValue: core.serialization.property("return_value", core.serialization.unknown().optional()), + error: core.serialization.string().optional(), + logs: core.serialization.list(ConsoleLogs).optional(), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace FunctionsPageOutput { + interface Raw { + return_value?: unknown | null; + error?: string | null; + logs?: ConsoleLogs.Raw[] | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/FunctionsPageRequest.ts b/src/serialization/types/FunctionsPageRequest.ts new file mode 100644 index 0000000..7bd38b2 --- /dev/null +++ b/src/serialization/types/FunctionsPageRequest.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RunSettings } from "./RunSettings"; + +export const FunctionsPageRequest: core.serialization.ObjectSchema< + serializers.FunctionsPageRequest.Raw, + Gooey.FunctionsPageRequest +> = core.serialization.object({ + code: core.serialization.string().optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + settings: RunSettings.optional(), +}); + +export declare namespace FunctionsPageRequest { + interface Raw { + code?: string | null; + variables?: Record | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/FunctionsPageResponse.ts b/src/serialization/types/FunctionsPageResponse.ts new file mode 100644 index 0000000..313240b --- /dev/null +++ b/src/serialization/types/FunctionsPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { FunctionsPageOutput } from "./FunctionsPageOutput"; + +export const FunctionsPageResponse: core.serialization.ObjectSchema< + serializers.FunctionsPageResponse.Raw, + Gooey.FunctionsPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: FunctionsPageOutput, +}); + +export declare namespace FunctionsPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: FunctionsPageOutput.Raw; + } +} diff --git a/src/serialization/types/FunctionsPageStatusResponse.ts b/src/serialization/types/FunctionsPageStatusResponse.ts new file mode 100644 index 0000000..6585a78 --- /dev/null +++ b/src/serialization/types/FunctionsPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { FunctionsPageOutput } from "./FunctionsPageOutput"; + +export const FunctionsPageStatusResponse: core.serialization.ObjectSchema< + serializers.FunctionsPageStatusResponse.Raw, + Gooey.FunctionsPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: FunctionsPageOutput.optional(), +}); + +export declare namespace FunctionsPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: FunctionsPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/GenericErrorResponse.ts b/src/serialization/types/GenericErrorResponse.ts new file mode 100644 index 0000000..131e1df --- /dev/null +++ b/src/serialization/types/GenericErrorResponse.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { GenericErrorResponseDetail } from "./GenericErrorResponseDetail"; + +export const GenericErrorResponse: core.serialization.ObjectSchema< + serializers.GenericErrorResponse.Raw, + Gooey.GenericErrorResponse +> = core.serialization.object({ + detail: GenericErrorResponseDetail, +}); + +export declare namespace GenericErrorResponse { + interface Raw { + detail: GenericErrorResponseDetail.Raw; + } +} diff --git a/src/serialization/types/GenericErrorResponseDetail.ts b/src/serialization/types/GenericErrorResponseDetail.ts new file mode 100644 index 0000000..b9c913e --- /dev/null +++ b/src/serialization/types/GenericErrorResponseDetail.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const GenericErrorResponseDetail: core.serialization.ObjectSchema< + serializers.GenericErrorResponseDetail.Raw, + Gooey.GenericErrorResponseDetail +> = core.serialization.object({ + error: core.serialization.string(), +}); + +export declare namespace GenericErrorResponseDetail { + interface Raw { + error: string; + } +} diff --git a/src/serialization/types/GoogleGptPageOutput.ts b/src/serialization/types/GoogleGptPageOutput.ts new file mode 100644 index 0000000..7f6ee92 --- /dev/null +++ b/src/serialization/types/GoogleGptPageOutput.ts @@ -0,0 +1,38 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { SearchReference } from "./SearchReference"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const GoogleGptPageOutput: core.serialization.ObjectSchema< + serializers.GoogleGptPageOutput.Raw, + Gooey.GoogleGptPageOutput +> = core.serialization.object({ + outputText: core.serialization.property("output_text", core.serialization.list(core.serialization.string())), + serpResults: core.serialization.property( + "serp_results", + core.serialization.record(core.serialization.string(), core.serialization.unknown()) + ), + references: core.serialization.list(SearchReference), + finalPrompt: core.serialization.property("final_prompt", core.serialization.string()), + finalSearchQuery: core.serialization.property("final_search_query", core.serialization.string().optional()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace GoogleGptPageOutput { + interface Raw { + output_text: string[]; + serp_results: Record; + references: SearchReference.Raw[]; + final_prompt: string; + final_search_query?: string | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/GoogleGptPageRequest.ts b/src/serialization/types/GoogleGptPageRequest.ts new file mode 100644 index 0000000..13c9f6e --- /dev/null +++ b/src/serialization/types/GoogleGptPageRequest.ts @@ -0,0 +1,73 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { SerpSearchLocation } from "./SerpSearchLocation"; +import { SerpSearchType } from "./SerpSearchType"; +import { GoogleGptPageRequestSelectedModel } from "./GoogleGptPageRequestSelectedModel"; +import { GoogleGptPageRequestEmbeddingModel } from "./GoogleGptPageRequestEmbeddingModel"; +import { RunSettings } from "./RunSettings"; + +export const GoogleGptPageRequest: core.serialization.ObjectSchema< + serializers.GoogleGptPageRequest.Raw, + Gooey.GoogleGptPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + serpSearchLocation: core.serialization.property("serp_search_location", SerpSearchLocation.optional()), + scaleserpLocations: core.serialization.property( + "scaleserp_locations", + core.serialization.list(core.serialization.string()).optional() + ), + serpSearchType: core.serialization.property("serp_search_type", SerpSearchType.optional()), + scaleserpSearchField: core.serialization.property("scaleserp_search_field", core.serialization.string().optional()), + searchQuery: core.serialization.property("search_query", core.serialization.string()), + siteFilter: core.serialization.property("site_filter", core.serialization.string()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + queryInstructions: core.serialization.property("query_instructions", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", GoogleGptPageRequestSelectedModel.optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + maxSearchUrls: core.serialization.property("max_search_urls", core.serialization.number().optional()), + maxReferences: core.serialization.property("max_references", core.serialization.number().optional()), + maxContextWords: core.serialization.property("max_context_words", core.serialization.number().optional()), + scrollJump: core.serialization.property("scroll_jump", core.serialization.number().optional()), + embeddingModel: core.serialization.property("embedding_model", GoogleGptPageRequestEmbeddingModel.optional()), + denseWeight: core.serialization.property("dense_weight", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace GoogleGptPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + serp_search_location?: SerpSearchLocation.Raw | null; + scaleserp_locations?: string[] | null; + serp_search_type?: SerpSearchType.Raw | null; + scaleserp_search_field?: string | null; + search_query: string; + site_filter: string; + task_instructions?: string | null; + query_instructions?: string | null; + selected_model?: GoogleGptPageRequestSelectedModel.Raw | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + max_search_urls?: number | null; + max_references?: number | null; + max_context_words?: number | null; + scroll_jump?: number | null; + embedding_model?: GoogleGptPageRequestEmbeddingModel.Raw | null; + dense_weight?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/GoogleGptPageRequestEmbeddingModel.ts b/src/serialization/types/GoogleGptPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..70aab97 --- /dev/null +++ b/src/serialization/types/GoogleGptPageRequestEmbeddingModel.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const GoogleGptPageRequestEmbeddingModel: core.serialization.Schema< + serializers.GoogleGptPageRequestEmbeddingModel.Raw, + Gooey.GoogleGptPageRequestEmbeddingModel +> = core.serialization.enum_([ + "openai_3_large", + "openai_3_small", + "openai_ada_2", + "e5_large_v2", + "e5_base_v2", + "multilingual_e5_base", + "multilingual_e5_large", + "gte_large", + "gte_base", +]); + +export declare namespace GoogleGptPageRequestEmbeddingModel { + type Raw = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; +} diff --git a/src/serialization/types/GoogleGptPageRequestSelectedModel.ts b/src/serialization/types/GoogleGptPageRequestSelectedModel.ts new file mode 100644 index 0000000..bd36cd6 --- /dev/null +++ b/src/serialization/types/GoogleGptPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const GoogleGptPageRequestSelectedModel: core.serialization.Schema< + serializers.GoogleGptPageRequestSelectedModel.Raw, + Gooey.GoogleGptPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace GoogleGptPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/GoogleGptPageResponse.ts b/src/serialization/types/GoogleGptPageResponse.ts new file mode 100644 index 0000000..654cca1 --- /dev/null +++ b/src/serialization/types/GoogleGptPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { GoogleGptPageOutput } from "./GoogleGptPageOutput"; + +export const GoogleGptPageResponse: core.serialization.ObjectSchema< + serializers.GoogleGptPageResponse.Raw, + Gooey.GoogleGptPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: GoogleGptPageOutput, +}); + +export declare namespace GoogleGptPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: GoogleGptPageOutput.Raw; + } +} diff --git a/src/serialization/types/GoogleGptPageStatusResponse.ts b/src/serialization/types/GoogleGptPageStatusResponse.ts new file mode 100644 index 0000000..4b708d6 --- /dev/null +++ b/src/serialization/types/GoogleGptPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { GoogleGptPageOutput } from "./GoogleGptPageOutput"; + +export const GoogleGptPageStatusResponse: core.serialization.ObjectSchema< + serializers.GoogleGptPageStatusResponse.Raw, + Gooey.GoogleGptPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: GoogleGptPageOutput.optional(), +}); + +export declare namespace GoogleGptPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: GoogleGptPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/GoogleImageGenPageOutput.ts b/src/serialization/types/GoogleImageGenPageOutput.ts new file mode 100644 index 0000000..dc5ec64 --- /dev/null +++ b/src/serialization/types/GoogleImageGenPageOutput.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const GoogleImageGenPageOutput: core.serialization.ObjectSchema< + serializers.GoogleImageGenPageOutput.Raw, + Gooey.GoogleImageGenPageOutput +> = core.serialization.object({ + outputImages: core.serialization.property("output_images", core.serialization.list(core.serialization.string())), + imageUrls: core.serialization.property("image_urls", core.serialization.list(core.serialization.string())), + selectedImage: core.serialization.property("selected_image", core.serialization.string().optional()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace GoogleImageGenPageOutput { + interface Raw { + output_images: string[]; + image_urls: string[]; + selected_image?: string | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/GoogleImageGenPageRequest.ts b/src/serialization/types/GoogleImageGenPageRequest.ts new file mode 100644 index 0000000..2b7e8a5 --- /dev/null +++ b/src/serialization/types/GoogleImageGenPageRequest.ts @@ -0,0 +1,57 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { SerpSearchLocation } from "./SerpSearchLocation"; +import { GoogleImageGenPageRequestSelectedModel } from "./GoogleImageGenPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const GoogleImageGenPageRequest: core.serialization.ObjectSchema< + serializers.GoogleImageGenPageRequest.Raw, + Gooey.GoogleImageGenPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + serpSearchLocation: core.serialization.property("serp_search_location", SerpSearchLocation.optional()), + scaleserpLocations: core.serialization.property( + "scaleserp_locations", + core.serialization.list(core.serialization.string()).optional() + ), + searchQuery: core.serialization.property("search_query", core.serialization.string()), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + selectedModel: core.serialization.property("selected_model", GoogleImageGenPageRequestSelectedModel.optional()), + negativePrompt: core.serialization.property("negative_prompt", core.serialization.string().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + guidanceScale: core.serialization.property("guidance_scale", core.serialization.number().optional()), + promptStrength: core.serialization.property("prompt_strength", core.serialization.number().optional()), + sd2Upscaling: core.serialization.property("sd_2_upscaling", core.serialization.boolean().optional()), + seed: core.serialization.number().optional(), + imageGuidanceScale: core.serialization.property("image_guidance_scale", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace GoogleImageGenPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + serp_search_location?: SerpSearchLocation.Raw | null; + scaleserp_locations?: string[] | null; + search_query: string; + text_prompt: string; + selected_model?: GoogleImageGenPageRequestSelectedModel.Raw | null; + negative_prompt?: string | null; + num_outputs?: number | null; + quality?: number | null; + guidance_scale?: number | null; + prompt_strength?: number | null; + sd_2_upscaling?: boolean | null; + seed?: number | null; + image_guidance_scale?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/GoogleImageGenPageRequestSelectedModel.ts b/src/serialization/types/GoogleImageGenPageRequestSelectedModel.ts new file mode 100644 index 0000000..aaf6e65 --- /dev/null +++ b/src/serialization/types/GoogleImageGenPageRequestSelectedModel.ts @@ -0,0 +1,41 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const GoogleImageGenPageRequestSelectedModel: core.serialization.Schema< + serializers.GoogleImageGenPageRequestSelectedModel.Raw, + Gooey.GoogleImageGenPageRequestSelectedModel +> = core.serialization.enum_([ + "dream_shaper", + "dreamlike_2", + "sd_2", + "sd_1_5", + "dall_e", + "instruct_pix2pix", + "openjourney_2", + "openjourney", + "analog_diffusion", + "protogen_5_3", + "jack_qiao", + "rodent_diffusion_1_5", +]); + +export declare namespace GoogleImageGenPageRequestSelectedModel { + type Raw = + | "dream_shaper" + | "dreamlike_2" + | "sd_2" + | "sd_1_5" + | "dall_e" + | "instruct_pix2pix" + | "openjourney_2" + | "openjourney" + | "analog_diffusion" + | "protogen_5_3" + | "jack_qiao" + | "rodent_diffusion_1_5"; +} diff --git a/src/serialization/types/GoogleImageGenPageResponse.ts b/src/serialization/types/GoogleImageGenPageResponse.ts new file mode 100644 index 0000000..00b7d86 --- /dev/null +++ b/src/serialization/types/GoogleImageGenPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { GoogleImageGenPageOutput } from "./GoogleImageGenPageOutput"; + +export const GoogleImageGenPageResponse: core.serialization.ObjectSchema< + serializers.GoogleImageGenPageResponse.Raw, + Gooey.GoogleImageGenPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: GoogleImageGenPageOutput, +}); + +export declare namespace GoogleImageGenPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: GoogleImageGenPageOutput.Raw; + } +} diff --git a/src/serialization/types/GoogleImageGenPageStatusResponse.ts b/src/serialization/types/GoogleImageGenPageStatusResponse.ts new file mode 100644 index 0000000..2b57f7b --- /dev/null +++ b/src/serialization/types/GoogleImageGenPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { GoogleImageGenPageOutput } from "./GoogleImageGenPageOutput"; + +export const GoogleImageGenPageStatusResponse: core.serialization.ObjectSchema< + serializers.GoogleImageGenPageStatusResponse.Raw, + Gooey.GoogleImageGenPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: GoogleImageGenPageOutput.optional(), +}); + +export declare namespace GoogleImageGenPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: GoogleImageGenPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/HttpValidationError.ts b/src/serialization/types/HttpValidationError.ts new file mode 100644 index 0000000..9ad726d --- /dev/null +++ b/src/serialization/types/HttpValidationError.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ValidationError } from "./ValidationError"; + +export const HttpValidationError: core.serialization.ObjectSchema< + serializers.HttpValidationError.Raw, + Gooey.HttpValidationError +> = core.serialization.object({ + detail: core.serialization.list(ValidationError).optional(), +}); + +export declare namespace HttpValidationError { + interface Raw { + detail?: ValidationError.Raw[] | null; + } +} diff --git a/src/serialization/types/ImageSegmentationPageOutput.ts b/src/serialization/types/ImageSegmentationPageOutput.ts new file mode 100644 index 0000000..77c2903 --- /dev/null +++ b/src/serialization/types/ImageSegmentationPageOutput.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const ImageSegmentationPageOutput: core.serialization.ObjectSchema< + serializers.ImageSegmentationPageOutput.Raw, + Gooey.ImageSegmentationPageOutput +> = core.serialization.object({ + outputImage: core.serialization.property("output_image", core.serialization.string()), + cutoutImage: core.serialization.property("cutout_image", core.serialization.string()), + resizedImage: core.serialization.property("resized_image", core.serialization.string()), + resizedMask: core.serialization.property("resized_mask", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace ImageSegmentationPageOutput { + interface Raw { + output_image: string; + cutout_image: string; + resized_image: string; + resized_mask: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/ImageSegmentationPageRequest.ts b/src/serialization/types/ImageSegmentationPageRequest.ts new file mode 100644 index 0000000..6444306 --- /dev/null +++ b/src/serialization/types/ImageSegmentationPageRequest.ts @@ -0,0 +1,46 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { ImageSegmentationPageRequestSelectedModel } from "./ImageSegmentationPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const ImageSegmentationPageRequest: core.serialization.ObjectSchema< + serializers.ImageSegmentationPageRequest.Raw, + Gooey.ImageSegmentationPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputImage: core.serialization.property("input_image", core.serialization.string()), + selectedModel: core.serialization.property("selected_model", ImageSegmentationPageRequestSelectedModel.optional()), + maskThreshold: core.serialization.property("mask_threshold", core.serialization.number().optional()), + rectPersepectiveTransform: core.serialization.property( + "rect_persepective_transform", + core.serialization.boolean().optional() + ), + reflectionOpacity: core.serialization.property("reflection_opacity", core.serialization.number().optional()), + objScale: core.serialization.property("obj_scale", core.serialization.number().optional()), + objPosX: core.serialization.property("obj_pos_x", core.serialization.number().optional()), + objPosY: core.serialization.property("obj_pos_y", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace ImageSegmentationPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_image: string; + selected_model?: ImageSegmentationPageRequestSelectedModel.Raw | null; + mask_threshold?: number | null; + rect_persepective_transform?: boolean | null; + reflection_opacity?: number | null; + obj_scale?: number | null; + obj_pos_x?: number | null; + obj_pos_y?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/ImageSegmentationPageRequestSelectedModel.ts b/src/serialization/types/ImageSegmentationPageRequestSelectedModel.ts new file mode 100644 index 0000000..a39d3dd --- /dev/null +++ b/src/serialization/types/ImageSegmentationPageRequestSelectedModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const ImageSegmentationPageRequestSelectedModel: core.serialization.Schema< + serializers.ImageSegmentationPageRequestSelectedModel.Raw, + Gooey.ImageSegmentationPageRequestSelectedModel +> = core.serialization.enum_(["dis", "u2net"]); + +export declare namespace ImageSegmentationPageRequestSelectedModel { + type Raw = "dis" | "u2net"; +} diff --git a/src/serialization/types/ImageSegmentationPageResponse.ts b/src/serialization/types/ImageSegmentationPageResponse.ts new file mode 100644 index 0000000..59ea1a8 --- /dev/null +++ b/src/serialization/types/ImageSegmentationPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ImageSegmentationPageOutput } from "./ImageSegmentationPageOutput"; + +export const ImageSegmentationPageResponse: core.serialization.ObjectSchema< + serializers.ImageSegmentationPageResponse.Raw, + Gooey.ImageSegmentationPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: ImageSegmentationPageOutput, +}); + +export declare namespace ImageSegmentationPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: ImageSegmentationPageOutput.Raw; + } +} diff --git a/src/serialization/types/ImageSegmentationPageStatusResponse.ts b/src/serialization/types/ImageSegmentationPageStatusResponse.ts new file mode 100644 index 0000000..f32bf7b --- /dev/null +++ b/src/serialization/types/ImageSegmentationPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { ImageSegmentationPageOutput } from "./ImageSegmentationPageOutput"; + +export const ImageSegmentationPageStatusResponse: core.serialization.ObjectSchema< + serializers.ImageSegmentationPageStatusResponse.Raw, + Gooey.ImageSegmentationPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: ImageSegmentationPageOutput.optional(), +}); + +export declare namespace ImageSegmentationPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: ImageSegmentationPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/ImageUrl.ts b/src/serialization/types/ImageUrl.ts new file mode 100644 index 0000000..7edeeed --- /dev/null +++ b/src/serialization/types/ImageUrl.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Detail } from "./Detail"; + +export const ImageUrl: core.serialization.ObjectSchema = + core.serialization.object({ + url: core.serialization.string().optional(), + detail: Detail.optional(), + }); + +export declare namespace ImageUrl { + interface Raw { + url?: string | null; + detail?: Detail.Raw | null; + } +} diff --git a/src/serialization/types/Img2ImgPageOutput.ts b/src/serialization/types/Img2ImgPageOutput.ts new file mode 100644 index 0000000..e3789d2 --- /dev/null +++ b/src/serialization/types/Img2ImgPageOutput.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const Img2ImgPageOutput: core.serialization.ObjectSchema< + serializers.Img2ImgPageOutput.Raw, + Gooey.Img2ImgPageOutput +> = core.serialization.object({ + outputImages: core.serialization.property("output_images", core.serialization.list(core.serialization.string())), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace Img2ImgPageOutput { + interface Raw { + output_images: string[]; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/Img2ImgPageRequest.ts b/src/serialization/types/Img2ImgPageRequest.ts new file mode 100644 index 0000000..0a1f18f --- /dev/null +++ b/src/serialization/types/Img2ImgPageRequest.ts @@ -0,0 +1,62 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { Img2ImgPageRequestSelectedModel } from "./Img2ImgPageRequestSelectedModel"; +import { Img2ImgPageRequestSelectedControlnetModel } from "./Img2ImgPageRequestSelectedControlnetModel"; +import { RunSettings } from "./RunSettings"; + +export const Img2ImgPageRequest: core.serialization.ObjectSchema< + serializers.Img2ImgPageRequest.Raw, + Gooey.Img2ImgPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputImage: core.serialization.property("input_image", core.serialization.string()), + textPrompt: core.serialization.property("text_prompt", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", Img2ImgPageRequestSelectedModel.optional()), + selectedControlnetModel: core.serialization.property( + "selected_controlnet_model", + Img2ImgPageRequestSelectedControlnetModel.optional() + ), + negativePrompt: core.serialization.property("negative_prompt", core.serialization.string().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + outputWidth: core.serialization.property("output_width", core.serialization.number().optional()), + outputHeight: core.serialization.property("output_height", core.serialization.number().optional()), + guidanceScale: core.serialization.property("guidance_scale", core.serialization.number().optional()), + promptStrength: core.serialization.property("prompt_strength", core.serialization.number().optional()), + controlnetConditioningScale: core.serialization.property( + "controlnet_conditioning_scale", + core.serialization.list(core.serialization.number()).optional() + ), + seed: core.serialization.number().optional(), + imageGuidanceScale: core.serialization.property("image_guidance_scale", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace Img2ImgPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_image: string; + text_prompt?: string | null; + selected_model?: Img2ImgPageRequestSelectedModel.Raw | null; + selected_controlnet_model?: Img2ImgPageRequestSelectedControlnetModel.Raw | null; + negative_prompt?: string | null; + num_outputs?: number | null; + quality?: number | null; + output_width?: number | null; + output_height?: number | null; + guidance_scale?: number | null; + prompt_strength?: number | null; + controlnet_conditioning_scale?: number[] | null; + seed?: number | null; + image_guidance_scale?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/Img2ImgPageRequestSelectedControlnetModel.ts b/src/serialization/types/Img2ImgPageRequestSelectedControlnetModel.ts new file mode 100644 index 0000000..0ebf799 --- /dev/null +++ b/src/serialization/types/Img2ImgPageRequestSelectedControlnetModel.ts @@ -0,0 +1,42 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Img2ImgPageRequestSelectedControlnetModelItem } from "./Img2ImgPageRequestSelectedControlnetModelItem"; + +export const Img2ImgPageRequestSelectedControlnetModel: core.serialization.Schema< + serializers.Img2ImgPageRequestSelectedControlnetModel.Raw, + Gooey.Img2ImgPageRequestSelectedControlnetModel +> = core.serialization.undiscriminatedUnion([ + core.serialization.list(Img2ImgPageRequestSelectedControlnetModelItem), + core.serialization.stringLiteral("sd_controlnet_canny"), + core.serialization.stringLiteral("sd_controlnet_depth"), + core.serialization.stringLiteral("sd_controlnet_hed"), + core.serialization.stringLiteral("sd_controlnet_mlsd"), + core.serialization.stringLiteral("sd_controlnet_normal"), + core.serialization.stringLiteral("sd_controlnet_openpose"), + core.serialization.stringLiteral("sd_controlnet_scribble"), + core.serialization.stringLiteral("sd_controlnet_seg"), + core.serialization.stringLiteral("sd_controlnet_tile"), + core.serialization.stringLiteral("sd_controlnet_brightness"), + core.serialization.stringLiteral("control_v1p_sd15_qrcode_monster_v2"), +]); + +export declare namespace Img2ImgPageRequestSelectedControlnetModel { + type Raw = + | Img2ImgPageRequestSelectedControlnetModelItem.Raw[] + | "sd_controlnet_canny" + | "sd_controlnet_depth" + | "sd_controlnet_hed" + | "sd_controlnet_mlsd" + | "sd_controlnet_normal" + | "sd_controlnet_openpose" + | "sd_controlnet_scribble" + | "sd_controlnet_seg" + | "sd_controlnet_tile" + | "sd_controlnet_brightness" + | "control_v1p_sd15_qrcode_monster_v2"; +} diff --git a/src/serialization/types/Img2ImgPageRequestSelectedControlnetModelItem.ts b/src/serialization/types/Img2ImgPageRequestSelectedControlnetModelItem.ts new file mode 100644 index 0000000..6aeaf03 --- /dev/null +++ b/src/serialization/types/Img2ImgPageRequestSelectedControlnetModelItem.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Img2ImgPageRequestSelectedControlnetModelItem: core.serialization.Schema< + serializers.Img2ImgPageRequestSelectedControlnetModelItem.Raw, + Gooey.Img2ImgPageRequestSelectedControlnetModelItem +> = core.serialization.enum_([ + "sd_controlnet_canny", + "sd_controlnet_depth", + "sd_controlnet_hed", + "sd_controlnet_mlsd", + "sd_controlnet_normal", + "sd_controlnet_openpose", + "sd_controlnet_scribble", + "sd_controlnet_seg", + "sd_controlnet_tile", + "sd_controlnet_brightness", + "control_v1p_sd15_qrcode_monster_v2", +]); + +export declare namespace Img2ImgPageRequestSelectedControlnetModelItem { + type Raw = + | "sd_controlnet_canny" + | "sd_controlnet_depth" + | "sd_controlnet_hed" + | "sd_controlnet_mlsd" + | "sd_controlnet_normal" + | "sd_controlnet_openpose" + | "sd_controlnet_scribble" + | "sd_controlnet_seg" + | "sd_controlnet_tile" + | "sd_controlnet_brightness" + | "control_v1p_sd15_qrcode_monster_v2"; +} diff --git a/src/serialization/types/Img2ImgPageRequestSelectedModel.ts b/src/serialization/types/Img2ImgPageRequestSelectedModel.ts new file mode 100644 index 0000000..b25f4fc --- /dev/null +++ b/src/serialization/types/Img2ImgPageRequestSelectedModel.ts @@ -0,0 +1,41 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Img2ImgPageRequestSelectedModel: core.serialization.Schema< + serializers.Img2ImgPageRequestSelectedModel.Raw, + Gooey.Img2ImgPageRequestSelectedModel +> = core.serialization.enum_([ + "dream_shaper", + "dreamlike_2", + "sd_2", + "sd_1_5", + "dall_e", + "instruct_pix2pix", + "openjourney_2", + "openjourney", + "analog_diffusion", + "protogen_5_3", + "jack_qiao", + "rodent_diffusion_1_5", +]); + +export declare namespace Img2ImgPageRequestSelectedModel { + type Raw = + | "dream_shaper" + | "dreamlike_2" + | "sd_2" + | "sd_1_5" + | "dall_e" + | "instruct_pix2pix" + | "openjourney_2" + | "openjourney" + | "analog_diffusion" + | "protogen_5_3" + | "jack_qiao" + | "rodent_diffusion_1_5"; +} diff --git a/src/serialization/types/Img2ImgPageResponse.ts b/src/serialization/types/Img2ImgPageResponse.ts new file mode 100644 index 0000000..650f358 --- /dev/null +++ b/src/serialization/types/Img2ImgPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Img2ImgPageOutput } from "./Img2ImgPageOutput"; + +export const Img2ImgPageResponse: core.serialization.ObjectSchema< + serializers.Img2ImgPageResponse.Raw, + Gooey.Img2ImgPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: Img2ImgPageOutput, +}); + +export declare namespace Img2ImgPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: Img2ImgPageOutput.Raw; + } +} diff --git a/src/serialization/types/Img2ImgPageStatusResponse.ts b/src/serialization/types/Img2ImgPageStatusResponse.ts new file mode 100644 index 0000000..85b6176 --- /dev/null +++ b/src/serialization/types/Img2ImgPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { Img2ImgPageOutput } from "./Img2ImgPageOutput"; + +export const Img2ImgPageStatusResponse: core.serialization.ObjectSchema< + serializers.Img2ImgPageStatusResponse.Raw, + Gooey.Img2ImgPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: Img2ImgPageOutput.optional(), +}); + +export declare namespace Img2ImgPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: Img2ImgPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/LetterWriterPageOutput.ts b/src/serialization/types/LetterWriterPageOutput.ts new file mode 100644 index 0000000..c786345 --- /dev/null +++ b/src/serialization/types/LetterWriterPageOutput.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const LetterWriterPageOutput: core.serialization.ObjectSchema< + serializers.LetterWriterPageOutput.Raw, + Gooey.LetterWriterPageOutput +> = core.serialization.object({ + outputLetters: core.serialization.property("output_letters", core.serialization.list(core.serialization.string())), + responseJson: core.serialization.property("response_json", core.serialization.unknown().optional()), + generatedInputPrompt: core.serialization.property("generated_input_prompt", core.serialization.string()), + finalPrompt: core.serialization.property("final_prompt", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace LetterWriterPageOutput { + interface Raw { + output_letters: string[]; + response_json?: unknown | null; + generated_input_prompt: string; + final_prompt: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/LetterWriterPageRequest.ts b/src/serialization/types/LetterWriterPageRequest.ts new file mode 100644 index 0000000..b49a8e5 --- /dev/null +++ b/src/serialization/types/LetterWriterPageRequest.ts @@ -0,0 +1,61 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { TrainingDataModel } from "./TrainingDataModel"; +import { RunSettings } from "./RunSettings"; + +export const LetterWriterPageRequest: core.serialization.ObjectSchema< + serializers.LetterWriterPageRequest.Raw, + Gooey.LetterWriterPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + actionId: core.serialization.property("action_id", core.serialization.string()), + promptHeader: core.serialization.property("prompt_header", core.serialization.string().optional()), + exampleLetters: core.serialization.property( + "example_letters", + core.serialization.list(TrainingDataModel).optional() + ), + lmSelectedApi: core.serialization.property("lm_selected_api", core.serialization.string().optional()), + lmSelectedEngine: core.serialization.property("lm_selected_engine", core.serialization.string().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + lmSamplingTemperature: core.serialization.property( + "lm_sampling_temperature", + core.serialization.number().optional() + ), + apiHttpMethod: core.serialization.property("api_http_method", core.serialization.string().optional()), + apiUrl: core.serialization.property("api_url", core.serialization.string().optional()), + apiHeaders: core.serialization.property("api_headers", core.serialization.string().optional()), + apiJsonBody: core.serialization.property("api_json_body", core.serialization.string().optional()), + inputPrompt: core.serialization.property("input_prompt", core.serialization.string().optional()), + stripHtml2Text: core.serialization.property("strip_html_2_text", core.serialization.boolean().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace LetterWriterPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + action_id: string; + prompt_header?: string | null; + example_letters?: TrainingDataModel.Raw[] | null; + lm_selected_api?: string | null; + lm_selected_engine?: string | null; + num_outputs?: number | null; + quality?: number | null; + lm_sampling_temperature?: number | null; + api_http_method?: string | null; + api_url?: string | null; + api_headers?: string | null; + api_json_body?: string | null; + input_prompt?: string | null; + strip_html_2_text?: boolean | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/LetterWriterPageResponse.ts b/src/serialization/types/LetterWriterPageResponse.ts new file mode 100644 index 0000000..932fe8f --- /dev/null +++ b/src/serialization/types/LetterWriterPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { LetterWriterPageOutput } from "./LetterWriterPageOutput"; + +export const LetterWriterPageResponse: core.serialization.ObjectSchema< + serializers.LetterWriterPageResponse.Raw, + Gooey.LetterWriterPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: LetterWriterPageOutput, +}); + +export declare namespace LetterWriterPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: LetterWriterPageOutput.Raw; + } +} diff --git a/src/serialization/types/LetterWriterPageStatusResponse.ts b/src/serialization/types/LetterWriterPageStatusResponse.ts new file mode 100644 index 0000000..8a6151a --- /dev/null +++ b/src/serialization/types/LetterWriterPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { LetterWriterPageOutput } from "./LetterWriterPageOutput"; + +export const LetterWriterPageStatusResponse: core.serialization.ObjectSchema< + serializers.LetterWriterPageStatusResponse.Raw, + Gooey.LetterWriterPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: LetterWriterPageOutput.optional(), +}); + +export declare namespace LetterWriterPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: LetterWriterPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/Level.ts b/src/serialization/types/Level.ts new file mode 100644 index 0000000..e5b8af2 --- /dev/null +++ b/src/serialization/types/Level.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Level: core.serialization.Schema = core.serialization.enum_([ + "log", + "error", +]); + +export declare namespace Level { + type Raw = "log" | "error"; +} diff --git a/src/serialization/types/LipsyncPageOutput.ts b/src/serialization/types/LipsyncPageOutput.ts new file mode 100644 index 0000000..a79bee2 --- /dev/null +++ b/src/serialization/types/LipsyncPageOutput.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const LipsyncPageOutput: core.serialization.ObjectSchema< + serializers.LipsyncPageOutput.Raw, + Gooey.LipsyncPageOutput +> = core.serialization.object({ + outputVideo: core.serialization.property("output_video", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace LipsyncPageOutput { + interface Raw { + output_video: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/LipsyncPageRequest.ts b/src/serialization/types/LipsyncPageRequest.ts new file mode 100644 index 0000000..9ece446 --- /dev/null +++ b/src/serialization/types/LipsyncPageRequest.ts @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { SadTalkerSettings } from "./SadTalkerSettings"; +import { LipsyncPageRequestSelectedModel } from "./LipsyncPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const LipsyncPageRequest: core.serialization.ObjectSchema< + serializers.LipsyncPageRequest.Raw, + Gooey.LipsyncPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputFace: core.serialization.property("input_face", core.serialization.string().optional()), + facePaddingTop: core.serialization.property("face_padding_top", core.serialization.number().optional()), + facePaddingBottom: core.serialization.property("face_padding_bottom", core.serialization.number().optional()), + facePaddingLeft: core.serialization.property("face_padding_left", core.serialization.number().optional()), + facePaddingRight: core.serialization.property("face_padding_right", core.serialization.number().optional()), + sadtalkerSettings: core.serialization.property("sadtalker_settings", SadTalkerSettings.optional()), + selectedModel: core.serialization.property("selected_model", LipsyncPageRequestSelectedModel.optional()), + inputAudio: core.serialization.property("input_audio", core.serialization.string().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace LipsyncPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_face?: string | null; + face_padding_top?: number | null; + face_padding_bottom?: number | null; + face_padding_left?: number | null; + face_padding_right?: number | null; + sadtalker_settings?: SadTalkerSettings.Raw | null; + selected_model?: LipsyncPageRequestSelectedModel.Raw | null; + input_audio?: string | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/LipsyncPageRequestSelectedModel.ts b/src/serialization/types/LipsyncPageRequestSelectedModel.ts new file mode 100644 index 0000000..038c418 --- /dev/null +++ b/src/serialization/types/LipsyncPageRequestSelectedModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const LipsyncPageRequestSelectedModel: core.serialization.Schema< + serializers.LipsyncPageRequestSelectedModel.Raw, + Gooey.LipsyncPageRequestSelectedModel +> = core.serialization.enum_(["Wav2Lip", "SadTalker"]); + +export declare namespace LipsyncPageRequestSelectedModel { + type Raw = "Wav2Lip" | "SadTalker"; +} diff --git a/src/serialization/types/LipsyncPageResponse.ts b/src/serialization/types/LipsyncPageResponse.ts new file mode 100644 index 0000000..be4ad6a --- /dev/null +++ b/src/serialization/types/LipsyncPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { LipsyncPageOutput } from "./LipsyncPageOutput"; + +export const LipsyncPageResponse: core.serialization.ObjectSchema< + serializers.LipsyncPageResponse.Raw, + Gooey.LipsyncPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: LipsyncPageOutput, +}); + +export declare namespace LipsyncPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: LipsyncPageOutput.Raw; + } +} diff --git a/src/serialization/types/LipsyncPageStatusResponse.ts b/src/serialization/types/LipsyncPageStatusResponse.ts new file mode 100644 index 0000000..f303203 --- /dev/null +++ b/src/serialization/types/LipsyncPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { LipsyncPageOutput } from "./LipsyncPageOutput"; + +export const LipsyncPageStatusResponse: core.serialization.ObjectSchema< + serializers.LipsyncPageStatusResponse.Raw, + Gooey.LipsyncPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: LipsyncPageOutput.optional(), +}); + +export declare namespace LipsyncPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: LipsyncPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/LipsyncTtsPageOutput.ts b/src/serialization/types/LipsyncTtsPageOutput.ts new file mode 100644 index 0000000..933c160 --- /dev/null +++ b/src/serialization/types/LipsyncTtsPageOutput.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const LipsyncTtsPageOutput: core.serialization.ObjectSchema< + serializers.LipsyncTtsPageOutput.Raw, + Gooey.LipsyncTtsPageOutput +> = core.serialization.object({ + audioUrl: core.serialization.property("audio_url", core.serialization.string().optional()), + outputVideo: core.serialization.property("output_video", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace LipsyncTtsPageOutput { + interface Raw { + audio_url?: string | null; + output_video: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/LipsyncTtsPageRequest.ts b/src/serialization/types/LipsyncTtsPageRequest.ts new file mode 100644 index 0000000..32dedb9 --- /dev/null +++ b/src/serialization/types/LipsyncTtsPageRequest.ts @@ -0,0 +1,89 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { LipsyncTtsPageRequestTtsProvider } from "./LipsyncTtsPageRequestTtsProvider"; +import { LipsyncTtsPageRequestOpenaiVoiceName } from "./LipsyncTtsPageRequestOpenaiVoiceName"; +import { LipsyncTtsPageRequestOpenaiTtsModel } from "./LipsyncTtsPageRequestOpenaiTtsModel"; +import { SadTalkerSettings } from "./SadTalkerSettings"; +import { LipsyncTtsPageRequestSelectedModel } from "./LipsyncTtsPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const LipsyncTtsPageRequest: core.serialization.ObjectSchema< + serializers.LipsyncTtsPageRequest.Raw, + Gooey.LipsyncTtsPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + ttsProvider: core.serialization.property("tts_provider", LipsyncTtsPageRequestTtsProvider.optional()), + uberduckVoiceName: core.serialization.property("uberduck_voice_name", core.serialization.string().optional()), + uberduckSpeakingRate: core.serialization.property("uberduck_speaking_rate", core.serialization.number().optional()), + googleVoiceName: core.serialization.property("google_voice_name", core.serialization.string().optional()), + googleSpeakingRate: core.serialization.property("google_speaking_rate", core.serialization.number().optional()), + googlePitch: core.serialization.property("google_pitch", core.serialization.number().optional()), + barkHistoryPrompt: core.serialization.property("bark_history_prompt", core.serialization.string().optional()), + elevenlabsVoiceName: core.serialization.property("elevenlabs_voice_name", core.serialization.string().optional()), + elevenlabsApiKey: core.serialization.property("elevenlabs_api_key", core.serialization.string().optional()), + elevenlabsVoiceId: core.serialization.property("elevenlabs_voice_id", core.serialization.string().optional()), + elevenlabsModel: core.serialization.property("elevenlabs_model", core.serialization.string().optional()), + elevenlabsStability: core.serialization.property("elevenlabs_stability", core.serialization.number().optional()), + elevenlabsSimilarityBoost: core.serialization.property( + "elevenlabs_similarity_boost", + core.serialization.number().optional() + ), + elevenlabsStyle: core.serialization.property("elevenlabs_style", core.serialization.number().optional()), + elevenlabsSpeakerBoost: core.serialization.property( + "elevenlabs_speaker_boost", + core.serialization.boolean().optional() + ), + azureVoiceName: core.serialization.property("azure_voice_name", core.serialization.string().optional()), + openaiVoiceName: core.serialization.property("openai_voice_name", LipsyncTtsPageRequestOpenaiVoiceName.optional()), + openaiTtsModel: core.serialization.property("openai_tts_model", LipsyncTtsPageRequestOpenaiTtsModel.optional()), + inputFace: core.serialization.property("input_face", core.serialization.string().optional()), + facePaddingTop: core.serialization.property("face_padding_top", core.serialization.number().optional()), + facePaddingBottom: core.serialization.property("face_padding_bottom", core.serialization.number().optional()), + facePaddingLeft: core.serialization.property("face_padding_left", core.serialization.number().optional()), + facePaddingRight: core.serialization.property("face_padding_right", core.serialization.number().optional()), + sadtalkerSettings: core.serialization.property("sadtalker_settings", SadTalkerSettings.optional()), + selectedModel: core.serialization.property("selected_model", LipsyncTtsPageRequestSelectedModel.optional()), + settings: RunSettings.optional(), +}); + +export declare namespace LipsyncTtsPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + text_prompt: string; + tts_provider?: LipsyncTtsPageRequestTtsProvider.Raw | null; + uberduck_voice_name?: string | null; + uberduck_speaking_rate?: number | null; + google_voice_name?: string | null; + google_speaking_rate?: number | null; + google_pitch?: number | null; + bark_history_prompt?: string | null; + elevenlabs_voice_name?: string | null; + elevenlabs_api_key?: string | null; + elevenlabs_voice_id?: string | null; + elevenlabs_model?: string | null; + elevenlabs_stability?: number | null; + elevenlabs_similarity_boost?: number | null; + elevenlabs_style?: number | null; + elevenlabs_speaker_boost?: boolean | null; + azure_voice_name?: string | null; + openai_voice_name?: LipsyncTtsPageRequestOpenaiVoiceName.Raw | null; + openai_tts_model?: LipsyncTtsPageRequestOpenaiTtsModel.Raw | null; + input_face?: string | null; + face_padding_top?: number | null; + face_padding_bottom?: number | null; + face_padding_left?: number | null; + face_padding_right?: number | null; + sadtalker_settings?: SadTalkerSettings.Raw | null; + selected_model?: LipsyncTtsPageRequestSelectedModel.Raw | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/LipsyncTtsPageRequestOpenaiTtsModel.ts b/src/serialization/types/LipsyncTtsPageRequestOpenaiTtsModel.ts new file mode 100644 index 0000000..6b4cb1f --- /dev/null +++ b/src/serialization/types/LipsyncTtsPageRequestOpenaiTtsModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const LipsyncTtsPageRequestOpenaiTtsModel: core.serialization.Schema< + serializers.LipsyncTtsPageRequestOpenaiTtsModel.Raw, + Gooey.LipsyncTtsPageRequestOpenaiTtsModel +> = core.serialization.enum_(["tts_1", "tts_1_hd"]); + +export declare namespace LipsyncTtsPageRequestOpenaiTtsModel { + type Raw = "tts_1" | "tts_1_hd"; +} diff --git a/src/serialization/types/LipsyncTtsPageRequestOpenaiVoiceName.ts b/src/serialization/types/LipsyncTtsPageRequestOpenaiVoiceName.ts new file mode 100644 index 0000000..9df6659 --- /dev/null +++ b/src/serialization/types/LipsyncTtsPageRequestOpenaiVoiceName.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const LipsyncTtsPageRequestOpenaiVoiceName: core.serialization.Schema< + serializers.LipsyncTtsPageRequestOpenaiVoiceName.Raw, + Gooey.LipsyncTtsPageRequestOpenaiVoiceName +> = core.serialization.enum_(["alloy", "echo", "fable", "onyx", "nova", "shimmer"]); + +export declare namespace LipsyncTtsPageRequestOpenaiVoiceName { + type Raw = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; +} diff --git a/src/serialization/types/LipsyncTtsPageRequestSelectedModel.ts b/src/serialization/types/LipsyncTtsPageRequestSelectedModel.ts new file mode 100644 index 0000000..984f0f9 --- /dev/null +++ b/src/serialization/types/LipsyncTtsPageRequestSelectedModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const LipsyncTtsPageRequestSelectedModel: core.serialization.Schema< + serializers.LipsyncTtsPageRequestSelectedModel.Raw, + Gooey.LipsyncTtsPageRequestSelectedModel +> = core.serialization.enum_(["Wav2Lip", "SadTalker"]); + +export declare namespace LipsyncTtsPageRequestSelectedModel { + type Raw = "Wav2Lip" | "SadTalker"; +} diff --git a/src/serialization/types/LipsyncTtsPageRequestTtsProvider.ts b/src/serialization/types/LipsyncTtsPageRequestTtsProvider.ts new file mode 100644 index 0000000..1a29612 --- /dev/null +++ b/src/serialization/types/LipsyncTtsPageRequestTtsProvider.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const LipsyncTtsPageRequestTtsProvider: core.serialization.Schema< + serializers.LipsyncTtsPageRequestTtsProvider.Raw, + Gooey.LipsyncTtsPageRequestTtsProvider +> = core.serialization.enum_(["GOOGLE_TTS", "ELEVEN_LABS", "UBERDUCK", "BARK", "AZURE_TTS", "OPEN_AI"]); + +export declare namespace LipsyncTtsPageRequestTtsProvider { + type Raw = "GOOGLE_TTS" | "ELEVEN_LABS" | "UBERDUCK" | "BARK" | "AZURE_TTS" | "OPEN_AI"; +} diff --git a/src/serialization/types/LipsyncTtsPageResponse.ts b/src/serialization/types/LipsyncTtsPageResponse.ts new file mode 100644 index 0000000..81692a6 --- /dev/null +++ b/src/serialization/types/LipsyncTtsPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { LipsyncTtsPageOutput } from "./LipsyncTtsPageOutput"; + +export const LipsyncTtsPageResponse: core.serialization.ObjectSchema< + serializers.LipsyncTtsPageResponse.Raw, + Gooey.LipsyncTtsPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: LipsyncTtsPageOutput, +}); + +export declare namespace LipsyncTtsPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: LipsyncTtsPageOutput.Raw; + } +} diff --git a/src/serialization/types/LipsyncTtsPageStatusResponse.ts b/src/serialization/types/LipsyncTtsPageStatusResponse.ts new file mode 100644 index 0000000..8e9f409 --- /dev/null +++ b/src/serialization/types/LipsyncTtsPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { LipsyncTtsPageOutput } from "./LipsyncTtsPageOutput"; + +export const LipsyncTtsPageStatusResponse: core.serialization.ObjectSchema< + serializers.LipsyncTtsPageStatusResponse.Raw, + Gooey.LipsyncTtsPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: LipsyncTtsPageOutput.optional(), +}); + +export declare namespace LipsyncTtsPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: LipsyncTtsPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/LlmTools.ts b/src/serialization/types/LlmTools.ts new file mode 100644 index 0000000..58ca3c2 --- /dev/null +++ b/src/serialization/types/LlmTools.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const LlmTools: core.serialization.Schema = + core.serialization.stringLiteral("json_to_pdf"); + +export declare namespace LlmTools { + type Raw = "json_to_pdf"; +} diff --git a/src/serialization/types/MessagePart.ts b/src/serialization/types/MessagePart.ts new file mode 100644 index 0000000..6f0398b --- /dev/null +++ b/src/serialization/types/MessagePart.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { ReplyButton } from "./ReplyButton"; + +export const MessagePart: core.serialization.ObjectSchema = + core.serialization.object({ + status: RecipeRunState, + detail: core.serialization.string(), + text: core.serialization.string().optional(), + audio: core.serialization.string().optional(), + video: core.serialization.string().optional(), + buttons: core.serialization.list(ReplyButton).optional(), + documents: core.serialization.list(core.serialization.string()).optional(), + type: core.serialization.string().optional(), + }); + +export declare namespace MessagePart { + interface Raw { + status: RecipeRunState.Raw; + detail: string; + text?: string | null; + audio?: string | null; + video?: string | null; + buttons?: ReplyButton.Raw[] | null; + documents?: string[] | null; + type?: string | null; + } +} diff --git a/src/serialization/types/ObjectInpaintingPageOutput.ts b/src/serialization/types/ObjectInpaintingPageOutput.ts new file mode 100644 index 0000000..5d869fc --- /dev/null +++ b/src/serialization/types/ObjectInpaintingPageOutput.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const ObjectInpaintingPageOutput: core.serialization.ObjectSchema< + serializers.ObjectInpaintingPageOutput.Raw, + Gooey.ObjectInpaintingPageOutput +> = core.serialization.object({ + resizedImage: core.serialization.property("resized_image", core.serialization.string()), + objMask: core.serialization.property("obj_mask", core.serialization.string()), + outputImages: core.serialization.property("output_images", core.serialization.list(core.serialization.string())), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace ObjectInpaintingPageOutput { + interface Raw { + resized_image: string; + obj_mask: string; + output_images: string[]; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/ObjectInpaintingPageRequest.ts b/src/serialization/types/ObjectInpaintingPageRequest.ts new file mode 100644 index 0000000..fbc26fc --- /dev/null +++ b/src/serialization/types/ObjectInpaintingPageRequest.ts @@ -0,0 +1,57 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { ObjectInpaintingPageRequestSelectedModel } from "./ObjectInpaintingPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const ObjectInpaintingPageRequest: core.serialization.ObjectSchema< + serializers.ObjectInpaintingPageRequest.Raw, + Gooey.ObjectInpaintingPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputImage: core.serialization.property("input_image", core.serialization.string()), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + objScale: core.serialization.property("obj_scale", core.serialization.number().optional()), + objPosX: core.serialization.property("obj_pos_x", core.serialization.number().optional()), + objPosY: core.serialization.property("obj_pos_y", core.serialization.number().optional()), + maskThreshold: core.serialization.property("mask_threshold", core.serialization.number().optional()), + selectedModel: core.serialization.property("selected_model", ObjectInpaintingPageRequestSelectedModel.optional()), + negativePrompt: core.serialization.property("negative_prompt", core.serialization.string().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + outputWidth: core.serialization.property("output_width", core.serialization.number().optional()), + outputHeight: core.serialization.property("output_height", core.serialization.number().optional()), + guidanceScale: core.serialization.property("guidance_scale", core.serialization.number().optional()), + sd2Upscaling: core.serialization.property("sd_2_upscaling", core.serialization.boolean().optional()), + seed: core.serialization.number().optional(), + settings: RunSettings.optional(), +}); + +export declare namespace ObjectInpaintingPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_image: string; + text_prompt: string; + obj_scale?: number | null; + obj_pos_x?: number | null; + obj_pos_y?: number | null; + mask_threshold?: number | null; + selected_model?: ObjectInpaintingPageRequestSelectedModel.Raw | null; + negative_prompt?: string | null; + num_outputs?: number | null; + quality?: number | null; + output_width?: number | null; + output_height?: number | null; + guidance_scale?: number | null; + sd_2_upscaling?: boolean | null; + seed?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/ObjectInpaintingPageRequestSelectedModel.ts b/src/serialization/types/ObjectInpaintingPageRequestSelectedModel.ts new file mode 100644 index 0000000..c88a1c3 --- /dev/null +++ b/src/serialization/types/ObjectInpaintingPageRequestSelectedModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const ObjectInpaintingPageRequestSelectedModel: core.serialization.Schema< + serializers.ObjectInpaintingPageRequestSelectedModel.Raw, + Gooey.ObjectInpaintingPageRequestSelectedModel +> = core.serialization.enum_(["sd_2", "runway_ml", "dall_e", "jack_qiao"]); + +export declare namespace ObjectInpaintingPageRequestSelectedModel { + type Raw = "sd_2" | "runway_ml" | "dall_e" | "jack_qiao"; +} diff --git a/src/serialization/types/ObjectInpaintingPageResponse.ts b/src/serialization/types/ObjectInpaintingPageResponse.ts new file mode 100644 index 0000000..1c16025 --- /dev/null +++ b/src/serialization/types/ObjectInpaintingPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ObjectInpaintingPageOutput } from "./ObjectInpaintingPageOutput"; + +export const ObjectInpaintingPageResponse: core.serialization.ObjectSchema< + serializers.ObjectInpaintingPageResponse.Raw, + Gooey.ObjectInpaintingPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: ObjectInpaintingPageOutput, +}); + +export declare namespace ObjectInpaintingPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: ObjectInpaintingPageOutput.Raw; + } +} diff --git a/src/serialization/types/ObjectInpaintingPageStatusResponse.ts b/src/serialization/types/ObjectInpaintingPageStatusResponse.ts new file mode 100644 index 0000000..2c34f5b --- /dev/null +++ b/src/serialization/types/ObjectInpaintingPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { ObjectInpaintingPageOutput } from "./ObjectInpaintingPageOutput"; + +export const ObjectInpaintingPageStatusResponse: core.serialization.ObjectSchema< + serializers.ObjectInpaintingPageStatusResponse.Raw, + Gooey.ObjectInpaintingPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: ObjectInpaintingPageOutput.optional(), +}); + +export declare namespace ObjectInpaintingPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: ObjectInpaintingPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/Preprocess.ts b/src/serialization/types/Preprocess.ts new file mode 100644 index 0000000..7b0cbc7 --- /dev/null +++ b/src/serialization/types/Preprocess.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Preprocess: core.serialization.Schema = + core.serialization.enum_(["crop", "extcrop", "resize", "full", "extfull"]); + +export declare namespace Preprocess { + type Raw = "crop" | "extcrop" | "resize" | "full" | "extfull"; +} diff --git a/src/serialization/types/Prompt.ts b/src/serialization/types/Prompt.ts new file mode 100644 index 0000000..95b7093 --- /dev/null +++ b/src/serialization/types/Prompt.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ConversationEntry } from "./ConversationEntry"; + +export const Prompt: core.serialization.Schema = + core.serialization.undiscriminatedUnion([core.serialization.string(), core.serialization.list(ConversationEntry)]); + +export declare namespace Prompt { + type Raw = string | ConversationEntry.Raw[]; +} diff --git a/src/serialization/types/PromptTreeNode.ts b/src/serialization/types/PromptTreeNode.ts new file mode 100644 index 0000000..a090904 --- /dev/null +++ b/src/serialization/types/PromptTreeNode.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Prompt } from "./Prompt"; + +export const PromptTreeNode: core.serialization.ObjectSchema = + core.serialization.object({ + prompt: Prompt, + children: core.serialization.list(core.serialization.lazyObject(() => serializers.PromptTreeNode)), + }); + +export declare namespace PromptTreeNode { + interface Raw { + prompt: Prompt.Raw; + children: serializers.PromptTreeNode.Raw[]; + } +} diff --git a/src/serialization/types/QrCodeGeneratorPageOutput.ts b/src/serialization/types/QrCodeGeneratorPageOutput.ts new file mode 100644 index 0000000..88608be --- /dev/null +++ b/src/serialization/types/QrCodeGeneratorPageOutput.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const QrCodeGeneratorPageOutput: core.serialization.ObjectSchema< + serializers.QrCodeGeneratorPageOutput.Raw, + Gooey.QrCodeGeneratorPageOutput +> = core.serialization.object({ + outputImages: core.serialization.property("output_images", core.serialization.list(core.serialization.string())), + rawImages: core.serialization.property("raw_images", core.serialization.list(core.serialization.string())), + shortenedUrl: core.serialization.property("shortened_url", core.serialization.string().optional()), + cleanedQrCode: core.serialization.property("cleaned_qr_code", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace QrCodeGeneratorPageOutput { + interface Raw { + output_images: string[]; + raw_images: string[]; + shortened_url?: string | null; + cleaned_qr_code: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/QrCodeGeneratorPageRequest.ts b/src/serialization/types/QrCodeGeneratorPageRequest.ts new file mode 100644 index 0000000..b208f53 --- /dev/null +++ b/src/serialization/types/QrCodeGeneratorPageRequest.ts @@ -0,0 +1,92 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { Vcard } from "./Vcard"; +import { QrCodeGeneratorPageRequestImagePromptControlnetModelsItem } from "./QrCodeGeneratorPageRequestImagePromptControlnetModelsItem"; +import { QrCodeGeneratorPageRequestSelectedModel } from "./QrCodeGeneratorPageRequestSelectedModel"; +import { QrCodeGeneratorPageRequestSelectedControlnetModelItem } from "./QrCodeGeneratorPageRequestSelectedControlnetModelItem"; +import { Scheduler } from "./Scheduler"; +import { RunSettings } from "./RunSettings"; + +export const QrCodeGeneratorPageRequest: core.serialization.ObjectSchema< + serializers.QrCodeGeneratorPageRequest.Raw, + Gooey.QrCodeGeneratorPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + qrCodeData: core.serialization.property("qr_code_data", core.serialization.string().optional()), + qrCodeInputImage: core.serialization.property("qr_code_input_image", core.serialization.string().optional()), + qrCodeVcard: core.serialization.property("qr_code_vcard", Vcard.optional()), + qrCodeFile: core.serialization.property("qr_code_file", core.serialization.string().optional()), + useUrlShortener: core.serialization.property("use_url_shortener", core.serialization.boolean().optional()), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + negativePrompt: core.serialization.property("negative_prompt", core.serialization.string().optional()), + imagePrompt: core.serialization.property("image_prompt", core.serialization.string().optional()), + imagePromptControlnetModels: core.serialization.property( + "image_prompt_controlnet_models", + core.serialization.list(QrCodeGeneratorPageRequestImagePromptControlnetModelsItem).optional() + ), + imagePromptStrength: core.serialization.property("image_prompt_strength", core.serialization.number().optional()), + imagePromptScale: core.serialization.property("image_prompt_scale", core.serialization.number().optional()), + imagePromptPosX: core.serialization.property("image_prompt_pos_x", core.serialization.number().optional()), + imagePromptPosY: core.serialization.property("image_prompt_pos_y", core.serialization.number().optional()), + selectedModel: core.serialization.property("selected_model", QrCodeGeneratorPageRequestSelectedModel.optional()), + selectedControlnetModel: core.serialization.property( + "selected_controlnet_model", + core.serialization.list(QrCodeGeneratorPageRequestSelectedControlnetModelItem).optional() + ), + outputWidth: core.serialization.property("output_width", core.serialization.number().optional()), + outputHeight: core.serialization.property("output_height", core.serialization.number().optional()), + guidanceScale: core.serialization.property("guidance_scale", core.serialization.number().optional()), + controlnetConditioningScale: core.serialization.property( + "controlnet_conditioning_scale", + core.serialization.list(core.serialization.number()).optional() + ), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + scheduler: Scheduler.optional(), + seed: core.serialization.number().optional(), + objScale: core.serialization.property("obj_scale", core.serialization.number().optional()), + objPosX: core.serialization.property("obj_pos_x", core.serialization.number().optional()), + objPosY: core.serialization.property("obj_pos_y", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace QrCodeGeneratorPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + qr_code_data?: string | null; + qr_code_input_image?: string | null; + qr_code_vcard?: Vcard.Raw | null; + qr_code_file?: string | null; + use_url_shortener?: boolean | null; + text_prompt: string; + negative_prompt?: string | null; + image_prompt?: string | null; + image_prompt_controlnet_models?: QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.Raw[] | null; + image_prompt_strength?: number | null; + image_prompt_scale?: number | null; + image_prompt_pos_x?: number | null; + image_prompt_pos_y?: number | null; + selected_model?: QrCodeGeneratorPageRequestSelectedModel.Raw | null; + selected_controlnet_model?: QrCodeGeneratorPageRequestSelectedControlnetModelItem.Raw[] | null; + output_width?: number | null; + output_height?: number | null; + guidance_scale?: number | null; + controlnet_conditioning_scale?: number[] | null; + num_outputs?: number | null; + quality?: number | null; + scheduler?: Scheduler.Raw | null; + seed?: number | null; + obj_scale?: number | null; + obj_pos_x?: number | null; + obj_pos_y?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts b/src/serialization/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts new file mode 100644 index 0000000..0bb2c1d --- /dev/null +++ b/src/serialization/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const QrCodeGeneratorPageRequestImagePromptControlnetModelsItem: core.serialization.Schema< + serializers.QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.Raw, + Gooey.QrCodeGeneratorPageRequestImagePromptControlnetModelsItem +> = core.serialization.enum_([ + "sd_controlnet_canny", + "sd_controlnet_depth", + "sd_controlnet_hed", + "sd_controlnet_mlsd", + "sd_controlnet_normal", + "sd_controlnet_openpose", + "sd_controlnet_scribble", + "sd_controlnet_seg", + "sd_controlnet_tile", + "sd_controlnet_brightness", + "control_v1p_sd15_qrcode_monster_v2", +]); + +export declare namespace QrCodeGeneratorPageRequestImagePromptControlnetModelsItem { + type Raw = + | "sd_controlnet_canny" + | "sd_controlnet_depth" + | "sd_controlnet_hed" + | "sd_controlnet_mlsd" + | "sd_controlnet_normal" + | "sd_controlnet_openpose" + | "sd_controlnet_scribble" + | "sd_controlnet_seg" + | "sd_controlnet_tile" + | "sd_controlnet_brightness" + | "control_v1p_sd15_qrcode_monster_v2"; +} diff --git a/src/serialization/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts b/src/serialization/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts new file mode 100644 index 0000000..c87f635 --- /dev/null +++ b/src/serialization/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const QrCodeGeneratorPageRequestSelectedControlnetModelItem: core.serialization.Schema< + serializers.QrCodeGeneratorPageRequestSelectedControlnetModelItem.Raw, + Gooey.QrCodeGeneratorPageRequestSelectedControlnetModelItem +> = core.serialization.enum_([ + "sd_controlnet_canny", + "sd_controlnet_depth", + "sd_controlnet_hed", + "sd_controlnet_mlsd", + "sd_controlnet_normal", + "sd_controlnet_openpose", + "sd_controlnet_scribble", + "sd_controlnet_seg", + "sd_controlnet_tile", + "sd_controlnet_brightness", + "control_v1p_sd15_qrcode_monster_v2", +]); + +export declare namespace QrCodeGeneratorPageRequestSelectedControlnetModelItem { + type Raw = + | "sd_controlnet_canny" + | "sd_controlnet_depth" + | "sd_controlnet_hed" + | "sd_controlnet_mlsd" + | "sd_controlnet_normal" + | "sd_controlnet_openpose" + | "sd_controlnet_scribble" + | "sd_controlnet_seg" + | "sd_controlnet_tile" + | "sd_controlnet_brightness" + | "control_v1p_sd15_qrcode_monster_v2"; +} diff --git a/src/serialization/types/QrCodeGeneratorPageRequestSelectedModel.ts b/src/serialization/types/QrCodeGeneratorPageRequestSelectedModel.ts new file mode 100644 index 0000000..59283d9 --- /dev/null +++ b/src/serialization/types/QrCodeGeneratorPageRequestSelectedModel.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const QrCodeGeneratorPageRequestSelectedModel: core.serialization.Schema< + serializers.QrCodeGeneratorPageRequestSelectedModel.Raw, + Gooey.QrCodeGeneratorPageRequestSelectedModel +> = core.serialization.enum_([ + "dream_shaper", + "dreamlike_2", + "sd_2", + "sd_1_5", + "dall_e", + "dall_e_3", + "openjourney_2", + "openjourney", + "analog_diffusion", + "protogen_5_3", + "jack_qiao", + "rodent_diffusion_1_5", + "deepfloyd_if", +]); + +export declare namespace QrCodeGeneratorPageRequestSelectedModel { + type Raw = + | "dream_shaper" + | "dreamlike_2" + | "sd_2" + | "sd_1_5" + | "dall_e" + | "dall_e_3" + | "openjourney_2" + | "openjourney" + | "analog_diffusion" + | "protogen_5_3" + | "jack_qiao" + | "rodent_diffusion_1_5" + | "deepfloyd_if"; +} diff --git a/src/serialization/types/QrCodeGeneratorPageResponse.ts b/src/serialization/types/QrCodeGeneratorPageResponse.ts new file mode 100644 index 0000000..7cfed90 --- /dev/null +++ b/src/serialization/types/QrCodeGeneratorPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { QrCodeGeneratorPageOutput } from "./QrCodeGeneratorPageOutput"; + +export const QrCodeGeneratorPageResponse: core.serialization.ObjectSchema< + serializers.QrCodeGeneratorPageResponse.Raw, + Gooey.QrCodeGeneratorPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: QrCodeGeneratorPageOutput, +}); + +export declare namespace QrCodeGeneratorPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: QrCodeGeneratorPageOutput.Raw; + } +} diff --git a/src/serialization/types/QrCodeGeneratorPageStatusResponse.ts b/src/serialization/types/QrCodeGeneratorPageStatusResponse.ts new file mode 100644 index 0000000..edb6222 --- /dev/null +++ b/src/serialization/types/QrCodeGeneratorPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { QrCodeGeneratorPageOutput } from "./QrCodeGeneratorPageOutput"; + +export const QrCodeGeneratorPageStatusResponse: core.serialization.ObjectSchema< + serializers.QrCodeGeneratorPageStatusResponse.Raw, + Gooey.QrCodeGeneratorPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: QrCodeGeneratorPageOutput.optional(), +}); + +export declare namespace QrCodeGeneratorPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: QrCodeGeneratorPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/RecipeFunction.ts b/src/serialization/types/RecipeFunction.ts new file mode 100644 index 0000000..278a586 --- /dev/null +++ b/src/serialization/types/RecipeFunction.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Trigger } from "./Trigger"; + +export const RecipeFunction: core.serialization.ObjectSchema = + core.serialization.object({ + url: core.serialization.string(), + trigger: Trigger, + }); + +export declare namespace RecipeFunction { + interface Raw { + url: string; + trigger: Trigger.Raw; + } +} diff --git a/src/serialization/types/RecipeRunState.ts b/src/serialization/types/RecipeRunState.ts new file mode 100644 index 0000000..c82b860 --- /dev/null +++ b/src/serialization/types/RecipeRunState.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RecipeRunState: core.serialization.Schema = + core.serialization.enum_(["starting", "running", "completed", "failed"]); + +export declare namespace RecipeRunState { + type Raw = "starting" | "running" | "completed" | "failed"; +} diff --git a/src/serialization/types/RelatedDocSearchResponse.ts b/src/serialization/types/RelatedDocSearchResponse.ts new file mode 100644 index 0000000..98e1e29 --- /dev/null +++ b/src/serialization/types/RelatedDocSearchResponse.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { SearchReference } from "./SearchReference"; + +export const RelatedDocSearchResponse: core.serialization.ObjectSchema< + serializers.RelatedDocSearchResponse.Raw, + Gooey.RelatedDocSearchResponse +> = core.serialization.object({ + outputText: core.serialization.property("output_text", core.serialization.list(core.serialization.string())), + references: core.serialization.list(SearchReference), + finalPrompt: core.serialization.property("final_prompt", core.serialization.string()), + finalSearchQuery: core.serialization.property("final_search_query", core.serialization.string().optional()), + searchQuery: core.serialization.property("search_query", core.serialization.string()), +}); + +export declare namespace RelatedDocSearchResponse { + interface Raw { + output_text: string[]; + references: SearchReference.Raw[]; + final_prompt: string; + final_search_query?: string | null; + search_query: string; + } +} diff --git a/src/serialization/types/RelatedGoogleGptResponse.ts b/src/serialization/types/RelatedGoogleGptResponse.ts new file mode 100644 index 0000000..863f74b --- /dev/null +++ b/src/serialization/types/RelatedGoogleGptResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { SearchReference } from "./SearchReference"; + +export const RelatedGoogleGptResponse: core.serialization.ObjectSchema< + serializers.RelatedGoogleGptResponse.Raw, + Gooey.RelatedGoogleGptResponse +> = core.serialization.object({ + outputText: core.serialization.property("output_text", core.serialization.list(core.serialization.string())), + serpResults: core.serialization.property( + "serp_results", + core.serialization.record(core.serialization.string(), core.serialization.unknown()) + ), + references: core.serialization.list(SearchReference), + finalPrompt: core.serialization.property("final_prompt", core.serialization.string()), + finalSearchQuery: core.serialization.property("final_search_query", core.serialization.string().optional()), + searchQuery: core.serialization.property("search_query", core.serialization.string()), +}); + +export declare namespace RelatedGoogleGptResponse { + interface Raw { + output_text: string[]; + serp_results: Record; + references: SearchReference.Raw[]; + final_prompt: string; + final_search_query?: string | null; + search_query: string; + } +} diff --git a/src/serialization/types/RelatedQnADocPageOutput.ts b/src/serialization/types/RelatedQnADocPageOutput.ts new file mode 100644 index 0000000..18b1fe8 --- /dev/null +++ b/src/serialization/types/RelatedQnADocPageOutput.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RelatedDocSearchResponse } from "./RelatedDocSearchResponse"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const RelatedQnADocPageOutput: core.serialization.ObjectSchema< + serializers.RelatedQnADocPageOutput.Raw, + Gooey.RelatedQnADocPageOutput +> = core.serialization.object({ + outputQueries: core.serialization.property("output_queries", core.serialization.list(RelatedDocSearchResponse)), + serpResults: core.serialization.property( + "serp_results", + core.serialization.record(core.serialization.string(), core.serialization.unknown()) + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace RelatedQnADocPageOutput { + interface Raw { + output_queries: RelatedDocSearchResponse.Raw[]; + serp_results: Record; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/RelatedQnADocPageRequest.ts b/src/serialization/types/RelatedQnADocPageRequest.ts new file mode 100644 index 0000000..557d70e --- /dev/null +++ b/src/serialization/types/RelatedQnADocPageRequest.ts @@ -0,0 +1,79 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { RelatedQnADocPageRequestKeywordQuery } from "./RelatedQnADocPageRequestKeywordQuery"; +import { RelatedQnADocPageRequestEmbeddingModel } from "./RelatedQnADocPageRequestEmbeddingModel"; +import { RelatedQnADocPageRequestSelectedModel } from "./RelatedQnADocPageRequestSelectedModel"; +import { RelatedQnADocPageRequestCitationStyle } from "./RelatedQnADocPageRequestCitationStyle"; +import { SerpSearchLocation } from "./SerpSearchLocation"; +import { SerpSearchType } from "./SerpSearchType"; +import { RunSettings } from "./RunSettings"; + +export const RelatedQnADocPageRequest: core.serialization.ObjectSchema< + serializers.RelatedQnADocPageRequest.Raw, + Gooey.RelatedQnADocPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + searchQuery: core.serialization.property("search_query", core.serialization.string()), + keywordQuery: core.serialization.property("keyword_query", RelatedQnADocPageRequestKeywordQuery.optional()), + documents: core.serialization.list(core.serialization.string()).optional(), + maxReferences: core.serialization.property("max_references", core.serialization.number().optional()), + maxContextWords: core.serialization.property("max_context_words", core.serialization.number().optional()), + scrollJump: core.serialization.property("scroll_jump", core.serialization.number().optional()), + docExtractUrl: core.serialization.property("doc_extract_url", core.serialization.string().optional()), + embeddingModel: core.serialization.property("embedding_model", RelatedQnADocPageRequestEmbeddingModel.optional()), + denseWeight: core.serialization.property("dense_weight", core.serialization.number().optional()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + queryInstructions: core.serialization.property("query_instructions", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", RelatedQnADocPageRequestSelectedModel.optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + citationStyle: core.serialization.property("citation_style", RelatedQnADocPageRequestCitationStyle.optional()), + serpSearchLocation: core.serialization.property("serp_search_location", SerpSearchLocation.optional()), + scaleserpLocations: core.serialization.property( + "scaleserp_locations", + core.serialization.list(core.serialization.string()).optional() + ), + serpSearchType: core.serialization.property("serp_search_type", SerpSearchType.optional()), + scaleserpSearchField: core.serialization.property("scaleserp_search_field", core.serialization.string().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace RelatedQnADocPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + search_query: string; + keyword_query?: RelatedQnADocPageRequestKeywordQuery.Raw | null; + documents?: string[] | null; + max_references?: number | null; + max_context_words?: number | null; + scroll_jump?: number | null; + doc_extract_url?: string | null; + embedding_model?: RelatedQnADocPageRequestEmbeddingModel.Raw | null; + dense_weight?: number | null; + task_instructions?: string | null; + query_instructions?: string | null; + selected_model?: RelatedQnADocPageRequestSelectedModel.Raw | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + citation_style?: RelatedQnADocPageRequestCitationStyle.Raw | null; + serp_search_location?: SerpSearchLocation.Raw | null; + scaleserp_locations?: string[] | null; + serp_search_type?: SerpSearchType.Raw | null; + scaleserp_search_field?: string | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/RelatedQnADocPageRequestCitationStyle.ts b/src/serialization/types/RelatedQnADocPageRequestCitationStyle.ts new file mode 100644 index 0000000..de23c31 --- /dev/null +++ b/src/serialization/types/RelatedQnADocPageRequestCitationStyle.ts @@ -0,0 +1,49 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RelatedQnADocPageRequestCitationStyle: core.serialization.Schema< + serializers.RelatedQnADocPageRequestCitationStyle.Raw, + Gooey.RelatedQnADocPageRequestCitationStyle +> = core.serialization.enum_([ + "number", + "title", + "url", + "symbol", + "markdown", + "html", + "slack_mrkdwn", + "plaintext", + "number_markdown", + "number_html", + "number_slack_mrkdwn", + "number_plaintext", + "symbol_markdown", + "symbol_html", + "symbol_slack_mrkdwn", + "symbol_plaintext", +]); + +export declare namespace RelatedQnADocPageRequestCitationStyle { + type Raw = + | "number" + | "title" + | "url" + | "symbol" + | "markdown" + | "html" + | "slack_mrkdwn" + | "plaintext" + | "number_markdown" + | "number_html" + | "number_slack_mrkdwn" + | "number_plaintext" + | "symbol_markdown" + | "symbol_html" + | "symbol_slack_mrkdwn" + | "symbol_plaintext"; +} diff --git a/src/serialization/types/RelatedQnADocPageRequestEmbeddingModel.ts b/src/serialization/types/RelatedQnADocPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..6c0c0c0 --- /dev/null +++ b/src/serialization/types/RelatedQnADocPageRequestEmbeddingModel.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RelatedQnADocPageRequestEmbeddingModel: core.serialization.Schema< + serializers.RelatedQnADocPageRequestEmbeddingModel.Raw, + Gooey.RelatedQnADocPageRequestEmbeddingModel +> = core.serialization.enum_([ + "openai_3_large", + "openai_3_small", + "openai_ada_2", + "e5_large_v2", + "e5_base_v2", + "multilingual_e5_base", + "multilingual_e5_large", + "gte_large", + "gte_base", +]); + +export declare namespace RelatedQnADocPageRequestEmbeddingModel { + type Raw = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; +} diff --git a/src/serialization/types/RelatedQnADocPageRequestKeywordQuery.ts b/src/serialization/types/RelatedQnADocPageRequestKeywordQuery.ts new file mode 100644 index 0000000..123be94 --- /dev/null +++ b/src/serialization/types/RelatedQnADocPageRequestKeywordQuery.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RelatedQnADocPageRequestKeywordQuery: core.serialization.Schema< + serializers.RelatedQnADocPageRequestKeywordQuery.Raw, + Gooey.RelatedQnADocPageRequestKeywordQuery +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.list(core.serialization.string()), +]); + +export declare namespace RelatedQnADocPageRequestKeywordQuery { + type Raw = string | string[]; +} diff --git a/src/serialization/types/RelatedQnADocPageRequestSelectedModel.ts b/src/serialization/types/RelatedQnADocPageRequestSelectedModel.ts new file mode 100644 index 0000000..0e29ce8 --- /dev/null +++ b/src/serialization/types/RelatedQnADocPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RelatedQnADocPageRequestSelectedModel: core.serialization.Schema< + serializers.RelatedQnADocPageRequestSelectedModel.Raw, + Gooey.RelatedQnADocPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace RelatedQnADocPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/RelatedQnADocPageResponse.ts b/src/serialization/types/RelatedQnADocPageResponse.ts new file mode 100644 index 0000000..22fb5f8 --- /dev/null +++ b/src/serialization/types/RelatedQnADocPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RelatedQnADocPageOutput } from "./RelatedQnADocPageOutput"; + +export const RelatedQnADocPageResponse: core.serialization.ObjectSchema< + serializers.RelatedQnADocPageResponse.Raw, + Gooey.RelatedQnADocPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: RelatedQnADocPageOutput, +}); + +export declare namespace RelatedQnADocPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: RelatedQnADocPageOutput.Raw; + } +} diff --git a/src/serialization/types/RelatedQnADocPageStatusResponse.ts b/src/serialization/types/RelatedQnADocPageStatusResponse.ts new file mode 100644 index 0000000..859a018 --- /dev/null +++ b/src/serialization/types/RelatedQnADocPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { RelatedQnADocPageOutput } from "./RelatedQnADocPageOutput"; + +export const RelatedQnADocPageStatusResponse: core.serialization.ObjectSchema< + serializers.RelatedQnADocPageStatusResponse.Raw, + Gooey.RelatedQnADocPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: RelatedQnADocPageOutput.optional(), +}); + +export declare namespace RelatedQnADocPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: RelatedQnADocPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/RelatedQnAPageOutput.ts b/src/serialization/types/RelatedQnAPageOutput.ts new file mode 100644 index 0000000..7bdd43f --- /dev/null +++ b/src/serialization/types/RelatedQnAPageOutput.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RelatedGoogleGptResponse } from "./RelatedGoogleGptResponse"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const RelatedQnAPageOutput: core.serialization.ObjectSchema< + serializers.RelatedQnAPageOutput.Raw, + Gooey.RelatedQnAPageOutput +> = core.serialization.object({ + outputQueries: core.serialization.property("output_queries", core.serialization.list(RelatedGoogleGptResponse)), + serpResults: core.serialization.property( + "serp_results", + core.serialization.record(core.serialization.string(), core.serialization.unknown()) + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace RelatedQnAPageOutput { + interface Raw { + output_queries: RelatedGoogleGptResponse.Raw[]; + serp_results: Record; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/RelatedQnAPageRequest.ts b/src/serialization/types/RelatedQnAPageRequest.ts new file mode 100644 index 0000000..6e6add1 --- /dev/null +++ b/src/serialization/types/RelatedQnAPageRequest.ts @@ -0,0 +1,73 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { SerpSearchLocation } from "./SerpSearchLocation"; +import { SerpSearchType } from "./SerpSearchType"; +import { RelatedQnAPageRequestSelectedModel } from "./RelatedQnAPageRequestSelectedModel"; +import { RelatedQnAPageRequestEmbeddingModel } from "./RelatedQnAPageRequestEmbeddingModel"; +import { RunSettings } from "./RunSettings"; + +export const RelatedQnAPageRequest: core.serialization.ObjectSchema< + serializers.RelatedQnAPageRequest.Raw, + Gooey.RelatedQnAPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + serpSearchLocation: core.serialization.property("serp_search_location", SerpSearchLocation.optional()), + scaleserpLocations: core.serialization.property( + "scaleserp_locations", + core.serialization.list(core.serialization.string()).optional() + ), + serpSearchType: core.serialization.property("serp_search_type", SerpSearchType.optional()), + scaleserpSearchField: core.serialization.property("scaleserp_search_field", core.serialization.string().optional()), + searchQuery: core.serialization.property("search_query", core.serialization.string()), + siteFilter: core.serialization.property("site_filter", core.serialization.string()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + queryInstructions: core.serialization.property("query_instructions", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", RelatedQnAPageRequestSelectedModel.optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + maxSearchUrls: core.serialization.property("max_search_urls", core.serialization.number().optional()), + maxReferences: core.serialization.property("max_references", core.serialization.number().optional()), + maxContextWords: core.serialization.property("max_context_words", core.serialization.number().optional()), + scrollJump: core.serialization.property("scroll_jump", core.serialization.number().optional()), + embeddingModel: core.serialization.property("embedding_model", RelatedQnAPageRequestEmbeddingModel.optional()), + denseWeight: core.serialization.property("dense_weight", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace RelatedQnAPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + serp_search_location?: SerpSearchLocation.Raw | null; + scaleserp_locations?: string[] | null; + serp_search_type?: SerpSearchType.Raw | null; + scaleserp_search_field?: string | null; + search_query: string; + site_filter: string; + task_instructions?: string | null; + query_instructions?: string | null; + selected_model?: RelatedQnAPageRequestSelectedModel.Raw | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + max_search_urls?: number | null; + max_references?: number | null; + max_context_words?: number | null; + scroll_jump?: number | null; + embedding_model?: RelatedQnAPageRequestEmbeddingModel.Raw | null; + dense_weight?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/RelatedQnAPageRequestEmbeddingModel.ts b/src/serialization/types/RelatedQnAPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..c9ee68a --- /dev/null +++ b/src/serialization/types/RelatedQnAPageRequestEmbeddingModel.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RelatedQnAPageRequestEmbeddingModel: core.serialization.Schema< + serializers.RelatedQnAPageRequestEmbeddingModel.Raw, + Gooey.RelatedQnAPageRequestEmbeddingModel +> = core.serialization.enum_([ + "openai_3_large", + "openai_3_small", + "openai_ada_2", + "e5_large_v2", + "e5_base_v2", + "multilingual_e5_base", + "multilingual_e5_large", + "gte_large", + "gte_base", +]); + +export declare namespace RelatedQnAPageRequestEmbeddingModel { + type Raw = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; +} diff --git a/src/serialization/types/RelatedQnAPageRequestSelectedModel.ts b/src/serialization/types/RelatedQnAPageRequestSelectedModel.ts new file mode 100644 index 0000000..0282e85 --- /dev/null +++ b/src/serialization/types/RelatedQnAPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RelatedQnAPageRequestSelectedModel: core.serialization.Schema< + serializers.RelatedQnAPageRequestSelectedModel.Raw, + Gooey.RelatedQnAPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace RelatedQnAPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/RelatedQnAPageResponse.ts b/src/serialization/types/RelatedQnAPageResponse.ts new file mode 100644 index 0000000..d6b520a --- /dev/null +++ b/src/serialization/types/RelatedQnAPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RelatedQnAPageOutput } from "./RelatedQnAPageOutput"; + +export const RelatedQnAPageResponse: core.serialization.ObjectSchema< + serializers.RelatedQnAPageResponse.Raw, + Gooey.RelatedQnAPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: RelatedQnAPageOutput, +}); + +export declare namespace RelatedQnAPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: RelatedQnAPageOutput.Raw; + } +} diff --git a/src/serialization/types/RelatedQnAPageStatusResponse.ts b/src/serialization/types/RelatedQnAPageStatusResponse.ts new file mode 100644 index 0000000..c61469a --- /dev/null +++ b/src/serialization/types/RelatedQnAPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { RelatedQnAPageOutput } from "./RelatedQnAPageOutput"; + +export const RelatedQnAPageStatusResponse: core.serialization.ObjectSchema< + serializers.RelatedQnAPageStatusResponse.Raw, + Gooey.RelatedQnAPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: RelatedQnAPageOutput.optional(), +}); + +export declare namespace RelatedQnAPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: RelatedQnAPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/ReplyButton.ts b/src/serialization/types/ReplyButton.ts new file mode 100644 index 0000000..e2de3d6 --- /dev/null +++ b/src/serialization/types/ReplyButton.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const ReplyButton: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string(), + title: core.serialization.string(), + }); + +export declare namespace ReplyButton { + interface Raw { + id: string; + title: string; + } +} diff --git a/src/serialization/types/ResponseModel.ts b/src/serialization/types/ResponseModel.ts new file mode 100644 index 0000000..7064376 --- /dev/null +++ b/src/serialization/types/ResponseModel.ts @@ -0,0 +1,70 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ResponseModelFinalPrompt } from "./ResponseModelFinalPrompt"; +import { SearchReference } from "./SearchReference"; +import { ResponseModelFinalKeywordQuery } from "./ResponseModelFinalKeywordQuery"; +import { ReplyButton } from "./ReplyButton"; + +export const ResponseModel: core.serialization.ObjectSchema = + core.serialization.object({ + finalPrompt: core.serialization.property("final_prompt", ResponseModelFinalPrompt.optional()), + outputText: core.serialization.property( + "output_text", + core.serialization.list(core.serialization.string()).optional() + ), + outputAudio: core.serialization.property( + "output_audio", + core.serialization.list(core.serialization.string()).optional() + ), + outputVideo: core.serialization.property( + "output_video", + core.serialization.list(core.serialization.string()).optional() + ), + rawInputText: core.serialization.property("raw_input_text", core.serialization.string().optional()), + rawTtsText: core.serialization.property( + "raw_tts_text", + core.serialization.list(core.serialization.string()).optional() + ), + rawOutputText: core.serialization.property( + "raw_output_text", + core.serialization.list(core.serialization.string()).optional() + ), + references: core.serialization.list(SearchReference).optional(), + finalSearchQuery: core.serialization.property("final_search_query", core.serialization.string().optional()), + finalKeywordQuery: core.serialization.property( + "final_keyword_query", + ResponseModelFinalKeywordQuery.optional() + ), + outputDocuments: core.serialization.property( + "output_documents", + core.serialization.list(core.serialization.string()).optional() + ), + replyButtons: core.serialization.property("reply_buttons", core.serialization.list(ReplyButton).optional()), + finishReason: core.serialization.property( + "finish_reason", + core.serialization.list(core.serialization.string()).optional() + ), + }); + +export declare namespace ResponseModel { + interface Raw { + final_prompt?: ResponseModelFinalPrompt.Raw | null; + output_text?: string[] | null; + output_audio?: string[] | null; + output_video?: string[] | null; + raw_input_text?: string | null; + raw_tts_text?: string[] | null; + raw_output_text?: string[] | null; + references?: SearchReference.Raw[] | null; + final_search_query?: string | null; + final_keyword_query?: ResponseModelFinalKeywordQuery.Raw | null; + output_documents?: string[] | null; + reply_buttons?: ReplyButton.Raw[] | null; + finish_reason?: string[] | null; + } +} diff --git a/src/serialization/types/ResponseModelFinalKeywordQuery.ts b/src/serialization/types/ResponseModelFinalKeywordQuery.ts new file mode 100644 index 0000000..8242fc4 --- /dev/null +++ b/src/serialization/types/ResponseModelFinalKeywordQuery.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const ResponseModelFinalKeywordQuery: core.serialization.Schema< + serializers.ResponseModelFinalKeywordQuery.Raw, + Gooey.ResponseModelFinalKeywordQuery +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.list(core.serialization.string()), +]); + +export declare namespace ResponseModelFinalKeywordQuery { + type Raw = string | string[]; +} diff --git a/src/serialization/types/ResponseModelFinalPrompt.ts b/src/serialization/types/ResponseModelFinalPrompt.ts new file mode 100644 index 0000000..30c3b9d --- /dev/null +++ b/src/serialization/types/ResponseModelFinalPrompt.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ConversationEntry } from "./ConversationEntry"; + +export const ResponseModelFinalPrompt: core.serialization.Schema< + serializers.ResponseModelFinalPrompt.Raw, + Gooey.ResponseModelFinalPrompt +> = core.serialization.undiscriminatedUnion([core.serialization.string(), core.serialization.list(ConversationEntry)]); + +export declare namespace ResponseModelFinalPrompt { + type Raw = string | ConversationEntry.Raw[]; +} diff --git a/src/serialization/types/Role.ts b/src/serialization/types/Role.ts new file mode 100644 index 0000000..da568e4 --- /dev/null +++ b/src/serialization/types/Role.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Role: core.serialization.Schema = core.serialization.enum_([ + "user", + "system", + "assistant", +]); + +export declare namespace Role { + type Raw = "user" | "system" | "assistant"; +} diff --git a/src/serialization/types/RunSettings.ts b/src/serialization/types/RunSettings.ts new file mode 100644 index 0000000..0aedae7 --- /dev/null +++ b/src/serialization/types/RunSettings.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RunSettingsRetentionPolicy } from "./RunSettingsRetentionPolicy"; + +export const RunSettings: core.serialization.ObjectSchema = + core.serialization.object({ + retentionPolicy: core.serialization.property("retention_policy", RunSettingsRetentionPolicy.optional()), + }); + +export declare namespace RunSettings { + interface Raw { + retention_policy?: RunSettingsRetentionPolicy.Raw | null; + } +} diff --git a/src/serialization/types/RunSettingsRetentionPolicy.ts b/src/serialization/types/RunSettingsRetentionPolicy.ts new file mode 100644 index 0000000..dbceac1 --- /dev/null +++ b/src/serialization/types/RunSettingsRetentionPolicy.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RunSettingsRetentionPolicy: core.serialization.Schema< + serializers.RunSettingsRetentionPolicy.Raw, + Gooey.RunSettingsRetentionPolicy +> = core.serialization.enum_(["keep", "delete"]); + +export declare namespace RunSettingsRetentionPolicy { + type Raw = "keep" | "delete"; +} diff --git a/src/serialization/types/RunStart.ts b/src/serialization/types/RunStart.ts new file mode 100644 index 0000000..cfd3741 --- /dev/null +++ b/src/serialization/types/RunStart.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const RunStart: core.serialization.ObjectSchema = + core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + statusUrl: core.serialization.property("status_url", core.serialization.string()), + type: core.serialization.string().optional(), + }); + +export declare namespace RunStart { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + status_url: string; + type?: string | null; + } +} diff --git a/src/serialization/types/SadTalkerSettings.ts b/src/serialization/types/SadTalkerSettings.ts new file mode 100644 index 0000000..7e4eca7 --- /dev/null +++ b/src/serialization/types/SadTalkerSettings.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Preprocess } from "./Preprocess"; + +export const SadTalkerSettings: core.serialization.ObjectSchema< + serializers.SadTalkerSettings.Raw, + Gooey.SadTalkerSettings +> = core.serialization.object({ + still: core.serialization.boolean().optional(), + preprocess: Preprocess.optional(), + poseStyle: core.serialization.property("pose_style", core.serialization.number().optional()), + expressionScale: core.serialization.property("expression_scale", core.serialization.number().optional()), + refEyeblink: core.serialization.property("ref_eyeblink", core.serialization.string().optional()), + refPose: core.serialization.property("ref_pose", core.serialization.string().optional()), + inputYaw: core.serialization.property("input_yaw", core.serialization.list(core.serialization.number()).optional()), + inputPitch: core.serialization.property( + "input_pitch", + core.serialization.list(core.serialization.number()).optional() + ), + inputRoll: core.serialization.property( + "input_roll", + core.serialization.list(core.serialization.number()).optional() + ), +}); + +export declare namespace SadTalkerSettings { + interface Raw { + still?: boolean | null; + preprocess?: Preprocess.Raw | null; + pose_style?: number | null; + expression_scale?: number | null; + ref_eyeblink?: string | null; + ref_pose?: string | null; + input_yaw?: number[] | null; + input_pitch?: number[] | null; + input_roll?: number[] | null; + } +} diff --git a/src/serialization/types/Scheduler.ts b/src/serialization/types/Scheduler.ts new file mode 100644 index 0000000..6d96c96 --- /dev/null +++ b/src/serialization/types/Scheduler.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Scheduler: core.serialization.Schema = + core.serialization.enum_([ + "singlestep_dpm_solver", + "multistep_dpm_solver", + "dpm_sde", + "dpm_discrete", + "dpm_discrete_ancestral", + "unipc", + "lms_discrete", + "heun", + "euler", + "euler_ancestral", + "pndm", + "ddpm", + "ddim", + "deis", + ]); + +export declare namespace Scheduler { + type Raw = + | "singlestep_dpm_solver" + | "multistep_dpm_solver" + | "dpm_sde" + | "dpm_discrete" + | "dpm_discrete_ancestral" + | "unipc" + | "lms_discrete" + | "heun" + | "euler" + | "euler_ancestral" + | "pndm" + | "ddpm" + | "ddim" + | "deis"; +} diff --git a/src/serialization/types/SearchReference.ts b/src/serialization/types/SearchReference.ts new file mode 100644 index 0000000..0b49d95 --- /dev/null +++ b/src/serialization/types/SearchReference.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const SearchReference: core.serialization.ObjectSchema = + core.serialization.object({ + url: core.serialization.string(), + title: core.serialization.string(), + snippet: core.serialization.string(), + score: core.serialization.number(), + }); + +export declare namespace SearchReference { + interface Raw { + url: string; + title: string; + snippet: string; + score: number; + } +} diff --git a/src/serialization/types/SeoSummaryPageOutput.ts b/src/serialization/types/SeoSummaryPageOutput.ts new file mode 100644 index 0000000..a761fc3 --- /dev/null +++ b/src/serialization/types/SeoSummaryPageOutput.ts @@ -0,0 +1,40 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const SeoSummaryPageOutput: core.serialization.ObjectSchema< + serializers.SeoSummaryPageOutput.Raw, + Gooey.SeoSummaryPageOutput +> = core.serialization.object({ + outputContent: core.serialization.property("output_content", core.serialization.list(core.serialization.string())), + serpResults: core.serialization.property( + "serp_results", + core.serialization.record(core.serialization.string(), core.serialization.unknown()) + ), + searchUrls: core.serialization.property("search_urls", core.serialization.list(core.serialization.string())), + summarizedUrls: core.serialization.property( + "summarized_urls", + core.serialization.list(core.serialization.record(core.serialization.string(), core.serialization.unknown())) + ), + finalPrompt: core.serialization.property("final_prompt", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace SeoSummaryPageOutput { + interface Raw { + output_content: string[]; + serp_results: Record; + search_urls: string[]; + summarized_urls: Record[]; + final_prompt: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/SeoSummaryPageRequest.ts b/src/serialization/types/SeoSummaryPageRequest.ts new file mode 100644 index 0000000..87a0a02 --- /dev/null +++ b/src/serialization/types/SeoSummaryPageRequest.ts @@ -0,0 +1,65 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { SerpSearchLocation } from "./SerpSearchLocation"; +import { SerpSearchType } from "./SerpSearchType"; +import { SeoSummaryPageRequestSelectedModel } from "./SeoSummaryPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const SeoSummaryPageRequest: core.serialization.ObjectSchema< + serializers.SeoSummaryPageRequest.Raw, + Gooey.SeoSummaryPageRequest +> = core.serialization.object({ + serpSearchLocation: core.serialization.property("serp_search_location", SerpSearchLocation.optional()), + scaleserpLocations: core.serialization.property( + "scaleserp_locations", + core.serialization.list(core.serialization.string()).optional() + ), + serpSearchType: core.serialization.property("serp_search_type", SerpSearchType.optional()), + scaleserpSearchField: core.serialization.property("scaleserp_search_field", core.serialization.string().optional()), + searchQuery: core.serialization.property("search_query", core.serialization.string()), + keywords: core.serialization.string(), + title: core.serialization.string(), + companyUrl: core.serialization.property("company_url", core.serialization.string()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + enableHtml: core.serialization.property("enable_html", core.serialization.boolean().optional()), + selectedModel: core.serialization.property("selected_model", SeoSummaryPageRequestSelectedModel.optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + maxSearchUrls: core.serialization.property("max_search_urls", core.serialization.number().optional()), + enableCrosslinks: core.serialization.property("enable_crosslinks", core.serialization.boolean().optional()), + seed: core.serialization.number().optional(), + settings: RunSettings.optional(), +}); + +export declare namespace SeoSummaryPageRequest { + interface Raw { + serp_search_location?: SerpSearchLocation.Raw | null; + scaleserp_locations?: string[] | null; + serp_search_type?: SerpSearchType.Raw | null; + scaleserp_search_field?: string | null; + search_query: string; + keywords: string; + title: string; + company_url: string; + task_instructions?: string | null; + enable_html?: boolean | null; + selected_model?: SeoSummaryPageRequestSelectedModel.Raw | null; + sampling_temperature?: number | null; + max_tokens?: number | null; + num_outputs?: number | null; + quality?: number | null; + avoid_repetition?: boolean | null; + max_search_urls?: number | null; + enable_crosslinks?: boolean | null; + seed?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/SeoSummaryPageRequestSelectedModel.ts b/src/serialization/types/SeoSummaryPageRequestSelectedModel.ts new file mode 100644 index 0000000..b02787d --- /dev/null +++ b/src/serialization/types/SeoSummaryPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const SeoSummaryPageRequestSelectedModel: core.serialization.Schema< + serializers.SeoSummaryPageRequestSelectedModel.Raw, + Gooey.SeoSummaryPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace SeoSummaryPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/SeoSummaryPageResponse.ts b/src/serialization/types/SeoSummaryPageResponse.ts new file mode 100644 index 0000000..05375aa --- /dev/null +++ b/src/serialization/types/SeoSummaryPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { SeoSummaryPageOutput } from "./SeoSummaryPageOutput"; + +export const SeoSummaryPageResponse: core.serialization.ObjectSchema< + serializers.SeoSummaryPageResponse.Raw, + Gooey.SeoSummaryPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: SeoSummaryPageOutput, +}); + +export declare namespace SeoSummaryPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: SeoSummaryPageOutput.Raw; + } +} diff --git a/src/serialization/types/SeoSummaryPageStatusResponse.ts b/src/serialization/types/SeoSummaryPageStatusResponse.ts new file mode 100644 index 0000000..bb99355 --- /dev/null +++ b/src/serialization/types/SeoSummaryPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { SeoSummaryPageOutput } from "./SeoSummaryPageOutput"; + +export const SeoSummaryPageStatusResponse: core.serialization.ObjectSchema< + serializers.SeoSummaryPageStatusResponse.Raw, + Gooey.SeoSummaryPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: SeoSummaryPageOutput.optional(), +}); + +export declare namespace SeoSummaryPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: SeoSummaryPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/SerpSearchLocation.ts b/src/serialization/types/SerpSearchLocation.ts new file mode 100644 index 0000000..f001ed2 --- /dev/null +++ b/src/serialization/types/SerpSearchLocation.ts @@ -0,0 +1,495 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const SerpSearchLocation: core.serialization.Schema< + serializers.SerpSearchLocation.Raw, + Gooey.SerpSearchLocation +> = core.serialization.enum_([ + "af", + "al", + "dz", + "as", + "ad", + "ao", + "ai", + "aq", + "ag", + "ar", + "am", + "aw", + "au", + "at", + "az", + "bs", + "bh", + "bd", + "bb", + "by", + "be", + "bz", + "bj", + "bm", + "bt", + "bo", + "ba", + "bw", + "bv", + "br", + "io", + "bn", + "bg", + "bf", + "bi", + "kh", + "cm", + "ca", + "cv", + "ky", + "cf", + "td", + "cl", + "cn", + "cx", + "cc", + "co", + "km", + "cg", + "cd", + "ck", + "cr", + "ci", + "hr", + "cu", + "cy", + "cz", + "dk", + "dj", + "dm", + "do", + "ec", + "eg", + "sv", + "gq", + "er", + "ee", + "et", + "fk", + "fo", + "fj", + "fi", + "fr", + "gf", + "pf", + "tf", + "ga", + "gm", + "ge", + "de", + "gh", + "gi", + "gr", + "gl", + "gd", + "gp", + "gu", + "gt", + "gn", + "gw", + "gy", + "ht", + "hm", + "va", + "hn", + "hk", + "hu", + "is", + "in", + "id", + "ir", + "iq", + "ie", + "il", + "it", + "jm", + "jp", + "jo", + "kz", + "ke", + "ki", + "kp", + "kr", + "kw", + "kg", + "la", + "lv", + "lb", + "ls", + "lr", + "ly", + "li", + "lt", + "lu", + "mo", + "mk", + "mg", + "mw", + "my", + "mv", + "ml", + "mt", + "mh", + "mq", + "mr", + "mu", + "yt", + "mx", + "fm", + "md", + "mc", + "mn", + "ms", + "ma", + "mz", + "mm", + "na", + "nr", + "np", + "nl", + "an", + "nc", + "nz", + "ni", + "ne", + "ng", + "nu", + "nf", + "mp", + "no", + "om", + "pk", + "pw", + "ps", + "pa", + "pg", + "py", + "pe", + "ph", + "pn", + "pl", + "pt", + "pr", + "qa", + "re", + "ro", + "ru", + "rw", + "sh", + "kn", + "lc", + "pm", + "vc", + "ws", + "sm", + "st", + "sa", + "sn", + "rs", + "sc", + "sl", + "sg", + "sk", + "si", + "sb", + "so", + "za", + "gs", + "es", + "lk", + "sd", + "sr", + "sj", + "sz", + "se", + "ch", + "sy", + "tw", + "tj", + "tz", + "th", + "tl", + "tg", + "tk", + "to", + "tt", + "tn", + "tr", + "tm", + "tc", + "tv", + "ug", + "ua", + "ae", + "gb", + "us", + "um", + "uy", + "uz", + "vu", + "ve", + "vn", + "vg", + "vi", + "wf", + "eh", + "ye", + "zm", + "zw", +]); + +export declare namespace SerpSearchLocation { + type Raw = + | "af" + | "al" + | "dz" + | "as" + | "ad" + | "ao" + | "ai" + | "aq" + | "ag" + | "ar" + | "am" + | "aw" + | "au" + | "at" + | "az" + | "bs" + | "bh" + | "bd" + | "bb" + | "by" + | "be" + | "bz" + | "bj" + | "bm" + | "bt" + | "bo" + | "ba" + | "bw" + | "bv" + | "br" + | "io" + | "bn" + | "bg" + | "bf" + | "bi" + | "kh" + | "cm" + | "ca" + | "cv" + | "ky" + | "cf" + | "td" + | "cl" + | "cn" + | "cx" + | "cc" + | "co" + | "km" + | "cg" + | "cd" + | "ck" + | "cr" + | "ci" + | "hr" + | "cu" + | "cy" + | "cz" + | "dk" + | "dj" + | "dm" + | "do" + | "ec" + | "eg" + | "sv" + | "gq" + | "er" + | "ee" + | "et" + | "fk" + | "fo" + | "fj" + | "fi" + | "fr" + | "gf" + | "pf" + | "tf" + | "ga" + | "gm" + | "ge" + | "de" + | "gh" + | "gi" + | "gr" + | "gl" + | "gd" + | "gp" + | "gu" + | "gt" + | "gn" + | "gw" + | "gy" + | "ht" + | "hm" + | "va" + | "hn" + | "hk" + | "hu" + | "is" + | "in" + | "id" + | "ir" + | "iq" + | "ie" + | "il" + | "it" + | "jm" + | "jp" + | "jo" + | "kz" + | "ke" + | "ki" + | "kp" + | "kr" + | "kw" + | "kg" + | "la" + | "lv" + | "lb" + | "ls" + | "lr" + | "ly" + | "li" + | "lt" + | "lu" + | "mo" + | "mk" + | "mg" + | "mw" + | "my" + | "mv" + | "ml" + | "mt" + | "mh" + | "mq" + | "mr" + | "mu" + | "yt" + | "mx" + | "fm" + | "md" + | "mc" + | "mn" + | "ms" + | "ma" + | "mz" + | "mm" + | "na" + | "nr" + | "np" + | "nl" + | "an" + | "nc" + | "nz" + | "ni" + | "ne" + | "ng" + | "nu" + | "nf" + | "mp" + | "no" + | "om" + | "pk" + | "pw" + | "ps" + | "pa" + | "pg" + | "py" + | "pe" + | "ph" + | "pn" + | "pl" + | "pt" + | "pr" + | "qa" + | "re" + | "ro" + | "ru" + | "rw" + | "sh" + | "kn" + | "lc" + | "pm" + | "vc" + | "ws" + | "sm" + | "st" + | "sa" + | "sn" + | "rs" + | "sc" + | "sl" + | "sg" + | "sk" + | "si" + | "sb" + | "so" + | "za" + | "gs" + | "es" + | "lk" + | "sd" + | "sr" + | "sj" + | "sz" + | "se" + | "ch" + | "sy" + | "tw" + | "tj" + | "tz" + | "th" + | "tl" + | "tg" + | "tk" + | "to" + | "tt" + | "tn" + | "tr" + | "tm" + | "tc" + | "tv" + | "ug" + | "ua" + | "ae" + | "gb" + | "us" + | "um" + | "uy" + | "uz" + | "vu" + | "ve" + | "vn" + | "vg" + | "vi" + | "wf" + | "eh" + | "ye" + | "zm" + | "zw"; +} diff --git a/src/serialization/types/SerpSearchType.ts b/src/serialization/types/SerpSearchType.ts new file mode 100644 index 0000000..d639d2b --- /dev/null +++ b/src/serialization/types/SerpSearchType.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const SerpSearchType: core.serialization.Schema = + core.serialization.enum_(["search", "images", "videos", "places", "news"]); + +export declare namespace SerpSearchType { + type Raw = "search" | "images" | "videos" | "places" | "news"; +} diff --git a/src/serialization/types/SmartGptPageOutput.ts b/src/serialization/types/SmartGptPageOutput.ts new file mode 100644 index 0000000..8608529 --- /dev/null +++ b/src/serialization/types/SmartGptPageOutput.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const SmartGptPageOutput: core.serialization.ObjectSchema< + serializers.SmartGptPageOutput.Raw, + Gooey.SmartGptPageOutput +> = core.serialization.object({ + outputText: core.serialization.property("output_text", core.serialization.list(core.serialization.string())), + promptTree: core.serialization.property( + "prompt_tree", + core.serialization.list(core.serialization.lazyObject(() => serializers.PromptTreeNode)).optional() + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace SmartGptPageOutput { + interface Raw { + output_text: string[]; + prompt_tree?: serializers.PromptTreeNode.Raw[] | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/SmartGptPageRequest.ts b/src/serialization/types/SmartGptPageRequest.ts new file mode 100644 index 0000000..b9a95d2 --- /dev/null +++ b/src/serialization/types/SmartGptPageRequest.ts @@ -0,0 +1,47 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { SmartGptPageRequestSelectedModel } from "./SmartGptPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const SmartGptPageRequest: core.serialization.ObjectSchema< + serializers.SmartGptPageRequest.Raw, + Gooey.SmartGptPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputPrompt: core.serialization.property("input_prompt", core.serialization.string()), + cotPrompt: core.serialization.property("cot_prompt", core.serialization.string().optional()), + reflexionPrompt: core.serialization.property("reflexion_prompt", core.serialization.string().optional()), + deraPrompt: core.serialization.property("dera_prompt", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", SmartGptPageRequestSelectedModel.optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace SmartGptPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_prompt: string; + cot_prompt?: string | null; + reflexion_prompt?: string | null; + dera_prompt?: string | null; + selected_model?: SmartGptPageRequestSelectedModel.Raw | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/SmartGptPageRequestSelectedModel.ts b/src/serialization/types/SmartGptPageRequestSelectedModel.ts new file mode 100644 index 0000000..5d90a1f --- /dev/null +++ b/src/serialization/types/SmartGptPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const SmartGptPageRequestSelectedModel: core.serialization.Schema< + serializers.SmartGptPageRequestSelectedModel.Raw, + Gooey.SmartGptPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace SmartGptPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/SmartGptPageResponse.ts b/src/serialization/types/SmartGptPageResponse.ts new file mode 100644 index 0000000..a0e0142 --- /dev/null +++ b/src/serialization/types/SmartGptPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { SmartGptPageOutput } from "./SmartGptPageOutput"; + +export const SmartGptPageResponse: core.serialization.ObjectSchema< + serializers.SmartGptPageResponse.Raw, + Gooey.SmartGptPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: SmartGptPageOutput, +}); + +export declare namespace SmartGptPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: SmartGptPageOutput.Raw; + } +} diff --git a/src/serialization/types/SmartGptPageStatusResponse.ts b/src/serialization/types/SmartGptPageStatusResponse.ts new file mode 100644 index 0000000..aa69069 --- /dev/null +++ b/src/serialization/types/SmartGptPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { SmartGptPageOutput } from "./SmartGptPageOutput"; + +export const SmartGptPageStatusResponse: core.serialization.ObjectSchema< + serializers.SmartGptPageStatusResponse.Raw, + Gooey.SmartGptPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: SmartGptPageOutput.optional(), +}); + +export declare namespace SmartGptPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: SmartGptPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/SocialLookupEmailPageOutput.ts b/src/serialization/types/SocialLookupEmailPageOutput.ts new file mode 100644 index 0000000..faaedbd --- /dev/null +++ b/src/serialization/types/SocialLookupEmailPageOutput.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const SocialLookupEmailPageOutput: core.serialization.ObjectSchema< + serializers.SocialLookupEmailPageOutput.Raw, + Gooey.SocialLookupEmailPageOutput +> = core.serialization.object({ + personData: core.serialization.property( + "person_data", + core.serialization.record(core.serialization.string(), core.serialization.unknown()) + ), + finalPrompt: core.serialization.property("final_prompt", core.serialization.string()), + outputText: core.serialization.property("output_text", core.serialization.list(core.serialization.string())), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace SocialLookupEmailPageOutput { + interface Raw { + person_data: Record; + final_prompt: string; + output_text: string[]; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/SocialLookupEmailPageRequest.ts b/src/serialization/types/SocialLookupEmailPageRequest.ts new file mode 100644 index 0000000..b186804 --- /dev/null +++ b/src/serialization/types/SocialLookupEmailPageRequest.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { SocialLookupEmailPageRequestSelectedModel } from "./SocialLookupEmailPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const SocialLookupEmailPageRequest: core.serialization.ObjectSchema< + serializers.SocialLookupEmailPageRequest.Raw, + Gooey.SocialLookupEmailPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + emailAddress: core.serialization.property("email_address", core.serialization.string()), + inputPrompt: core.serialization.property("input_prompt", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", SocialLookupEmailPageRequestSelectedModel.optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace SocialLookupEmailPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + email_address: string; + input_prompt?: string | null; + selected_model?: SocialLookupEmailPageRequestSelectedModel.Raw | null; + num_outputs?: number | null; + avoid_repetition?: boolean | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/SocialLookupEmailPageRequestSelectedModel.ts b/src/serialization/types/SocialLookupEmailPageRequestSelectedModel.ts new file mode 100644 index 0000000..d52da6c --- /dev/null +++ b/src/serialization/types/SocialLookupEmailPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const SocialLookupEmailPageRequestSelectedModel: core.serialization.Schema< + serializers.SocialLookupEmailPageRequestSelectedModel.Raw, + Gooey.SocialLookupEmailPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace SocialLookupEmailPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/SocialLookupEmailPageResponse.ts b/src/serialization/types/SocialLookupEmailPageResponse.ts new file mode 100644 index 0000000..efad91e --- /dev/null +++ b/src/serialization/types/SocialLookupEmailPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { SocialLookupEmailPageOutput } from "./SocialLookupEmailPageOutput"; + +export const SocialLookupEmailPageResponse: core.serialization.ObjectSchema< + serializers.SocialLookupEmailPageResponse.Raw, + Gooey.SocialLookupEmailPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: SocialLookupEmailPageOutput, +}); + +export declare namespace SocialLookupEmailPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: SocialLookupEmailPageOutput.Raw; + } +} diff --git a/src/serialization/types/SocialLookupEmailPageStatusResponse.ts b/src/serialization/types/SocialLookupEmailPageStatusResponse.ts new file mode 100644 index 0000000..985b3ff --- /dev/null +++ b/src/serialization/types/SocialLookupEmailPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { SocialLookupEmailPageOutput } from "./SocialLookupEmailPageOutput"; + +export const SocialLookupEmailPageStatusResponse: core.serialization.ObjectSchema< + serializers.SocialLookupEmailPageStatusResponse.Raw, + Gooey.SocialLookupEmailPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: SocialLookupEmailPageOutput.optional(), +}); + +export declare namespace SocialLookupEmailPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: SocialLookupEmailPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/StreamError.ts b/src/serialization/types/StreamError.ts new file mode 100644 index 0000000..fdb02f1 --- /dev/null +++ b/src/serialization/types/StreamError.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const StreamError: core.serialization.ObjectSchema = + core.serialization.object({ + detail: core.serialization.string(), + type: core.serialization.string().optional(), + }); + +export declare namespace StreamError { + interface Raw { + detail: string; + type?: string | null; + } +} diff --git a/src/serialization/types/Text2AudioPageOutput.ts b/src/serialization/types/Text2AudioPageOutput.ts new file mode 100644 index 0000000..70f8baf --- /dev/null +++ b/src/serialization/types/Text2AudioPageOutput.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const Text2AudioPageOutput: core.serialization.ObjectSchema< + serializers.Text2AudioPageOutput.Raw, + Gooey.Text2AudioPageOutput +> = core.serialization.object({ + outputAudios: core.serialization.property( + "output_audios", + core.serialization.record(core.serialization.string(), core.serialization.list(core.serialization.string())) + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace Text2AudioPageOutput { + interface Raw { + output_audios: Record; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/Text2AudioPageRequest.ts b/src/serialization/types/Text2AudioPageRequest.ts new file mode 100644 index 0000000..9ee6612 --- /dev/null +++ b/src/serialization/types/Text2AudioPageRequest.ts @@ -0,0 +1,47 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { RunSettings } from "./RunSettings"; + +export const Text2AudioPageRequest: core.serialization.ObjectSchema< + serializers.Text2AudioPageRequest.Raw, + Gooey.Text2AudioPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + negativePrompt: core.serialization.property("negative_prompt", core.serialization.string().optional()), + durationSec: core.serialization.property("duration_sec", core.serialization.number().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + guidanceScale: core.serialization.property("guidance_scale", core.serialization.number().optional()), + seed: core.serialization.number().optional(), + sd2Upscaling: core.serialization.property("sd_2_upscaling", core.serialization.boolean().optional()), + selectedModels: core.serialization.property( + "selected_models", + core.serialization.list(core.serialization.stringLiteral("audio_ldm")).optional() + ), + settings: RunSettings.optional(), +}); + +export declare namespace Text2AudioPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + text_prompt: string; + negative_prompt?: string | null; + duration_sec?: number | null; + num_outputs?: number | null; + quality?: number | null; + guidance_scale?: number | null; + seed?: number | null; + sd_2_upscaling?: boolean | null; + selected_models?: "audio_ldm"[] | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/Text2AudioPageResponse.ts b/src/serialization/types/Text2AudioPageResponse.ts new file mode 100644 index 0000000..b6c27db --- /dev/null +++ b/src/serialization/types/Text2AudioPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { Text2AudioPageOutput } from "./Text2AudioPageOutput"; + +export const Text2AudioPageResponse: core.serialization.ObjectSchema< + serializers.Text2AudioPageResponse.Raw, + Gooey.Text2AudioPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: Text2AudioPageOutput, +}); + +export declare namespace Text2AudioPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: Text2AudioPageOutput.Raw; + } +} diff --git a/src/serialization/types/Text2AudioPageStatusResponse.ts b/src/serialization/types/Text2AudioPageStatusResponse.ts new file mode 100644 index 0000000..1db2eb4 --- /dev/null +++ b/src/serialization/types/Text2AudioPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { Text2AudioPageOutput } from "./Text2AudioPageOutput"; + +export const Text2AudioPageStatusResponse: core.serialization.ObjectSchema< + serializers.Text2AudioPageStatusResponse.Raw, + Gooey.Text2AudioPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: Text2AudioPageOutput.optional(), +}); + +export declare namespace Text2AudioPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: Text2AudioPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/TextToSpeechPageOutput.ts b/src/serialization/types/TextToSpeechPageOutput.ts new file mode 100644 index 0000000..cff00e9 --- /dev/null +++ b/src/serialization/types/TextToSpeechPageOutput.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const TextToSpeechPageOutput: core.serialization.ObjectSchema< + serializers.TextToSpeechPageOutput.Raw, + Gooey.TextToSpeechPageOutput +> = core.serialization.object({ + audioUrl: core.serialization.property("audio_url", core.serialization.string()), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace TextToSpeechPageOutput { + interface Raw { + audio_url: string; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/TextToSpeechPageRequest.ts b/src/serialization/types/TextToSpeechPageRequest.ts new file mode 100644 index 0000000..4918a2c --- /dev/null +++ b/src/serialization/types/TextToSpeechPageRequest.ts @@ -0,0 +1,76 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { TextToSpeechPageRequestTtsProvider } from "./TextToSpeechPageRequestTtsProvider"; +import { TextToSpeechPageRequestOpenaiVoiceName } from "./TextToSpeechPageRequestOpenaiVoiceName"; +import { TextToSpeechPageRequestOpenaiTtsModel } from "./TextToSpeechPageRequestOpenaiTtsModel"; +import { RunSettings } from "./RunSettings"; + +export const TextToSpeechPageRequest: core.serialization.ObjectSchema< + serializers.TextToSpeechPageRequest.Raw, + Gooey.TextToSpeechPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + textPrompt: core.serialization.property("text_prompt", core.serialization.string()), + ttsProvider: core.serialization.property("tts_provider", TextToSpeechPageRequestTtsProvider.optional()), + uberduckVoiceName: core.serialization.property("uberduck_voice_name", core.serialization.string().optional()), + uberduckSpeakingRate: core.serialization.property("uberduck_speaking_rate", core.serialization.number().optional()), + googleVoiceName: core.serialization.property("google_voice_name", core.serialization.string().optional()), + googleSpeakingRate: core.serialization.property("google_speaking_rate", core.serialization.number().optional()), + googlePitch: core.serialization.property("google_pitch", core.serialization.number().optional()), + barkHistoryPrompt: core.serialization.property("bark_history_prompt", core.serialization.string().optional()), + elevenlabsVoiceName: core.serialization.property("elevenlabs_voice_name", core.serialization.string().optional()), + elevenlabsApiKey: core.serialization.property("elevenlabs_api_key", core.serialization.string().optional()), + elevenlabsVoiceId: core.serialization.property("elevenlabs_voice_id", core.serialization.string().optional()), + elevenlabsModel: core.serialization.property("elevenlabs_model", core.serialization.string().optional()), + elevenlabsStability: core.serialization.property("elevenlabs_stability", core.serialization.number().optional()), + elevenlabsSimilarityBoost: core.serialization.property( + "elevenlabs_similarity_boost", + core.serialization.number().optional() + ), + elevenlabsStyle: core.serialization.property("elevenlabs_style", core.serialization.number().optional()), + elevenlabsSpeakerBoost: core.serialization.property( + "elevenlabs_speaker_boost", + core.serialization.boolean().optional() + ), + azureVoiceName: core.serialization.property("azure_voice_name", core.serialization.string().optional()), + openaiVoiceName: core.serialization.property( + "openai_voice_name", + TextToSpeechPageRequestOpenaiVoiceName.optional() + ), + openaiTtsModel: core.serialization.property("openai_tts_model", TextToSpeechPageRequestOpenaiTtsModel.optional()), + settings: RunSettings.optional(), +}); + +export declare namespace TextToSpeechPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + text_prompt: string; + tts_provider?: TextToSpeechPageRequestTtsProvider.Raw | null; + uberduck_voice_name?: string | null; + uberduck_speaking_rate?: number | null; + google_voice_name?: string | null; + google_speaking_rate?: number | null; + google_pitch?: number | null; + bark_history_prompt?: string | null; + elevenlabs_voice_name?: string | null; + elevenlabs_api_key?: string | null; + elevenlabs_voice_id?: string | null; + elevenlabs_model?: string | null; + elevenlabs_stability?: number | null; + elevenlabs_similarity_boost?: number | null; + elevenlabs_style?: number | null; + elevenlabs_speaker_boost?: boolean | null; + azure_voice_name?: string | null; + openai_voice_name?: TextToSpeechPageRequestOpenaiVoiceName.Raw | null; + openai_tts_model?: TextToSpeechPageRequestOpenaiTtsModel.Raw | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/TextToSpeechPageRequestOpenaiTtsModel.ts b/src/serialization/types/TextToSpeechPageRequestOpenaiTtsModel.ts new file mode 100644 index 0000000..9955e2e --- /dev/null +++ b/src/serialization/types/TextToSpeechPageRequestOpenaiTtsModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const TextToSpeechPageRequestOpenaiTtsModel: core.serialization.Schema< + serializers.TextToSpeechPageRequestOpenaiTtsModel.Raw, + Gooey.TextToSpeechPageRequestOpenaiTtsModel +> = core.serialization.enum_(["tts_1", "tts_1_hd"]); + +export declare namespace TextToSpeechPageRequestOpenaiTtsModel { + type Raw = "tts_1" | "tts_1_hd"; +} diff --git a/src/serialization/types/TextToSpeechPageRequestOpenaiVoiceName.ts b/src/serialization/types/TextToSpeechPageRequestOpenaiVoiceName.ts new file mode 100644 index 0000000..1b9115c --- /dev/null +++ b/src/serialization/types/TextToSpeechPageRequestOpenaiVoiceName.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const TextToSpeechPageRequestOpenaiVoiceName: core.serialization.Schema< + serializers.TextToSpeechPageRequestOpenaiVoiceName.Raw, + Gooey.TextToSpeechPageRequestOpenaiVoiceName +> = core.serialization.enum_(["alloy", "echo", "fable", "onyx", "nova", "shimmer"]); + +export declare namespace TextToSpeechPageRequestOpenaiVoiceName { + type Raw = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; +} diff --git a/src/serialization/types/TextToSpeechPageRequestTtsProvider.ts b/src/serialization/types/TextToSpeechPageRequestTtsProvider.ts new file mode 100644 index 0000000..fb08971 --- /dev/null +++ b/src/serialization/types/TextToSpeechPageRequestTtsProvider.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const TextToSpeechPageRequestTtsProvider: core.serialization.Schema< + serializers.TextToSpeechPageRequestTtsProvider.Raw, + Gooey.TextToSpeechPageRequestTtsProvider +> = core.serialization.enum_(["GOOGLE_TTS", "ELEVEN_LABS", "UBERDUCK", "BARK", "AZURE_TTS", "OPEN_AI"]); + +export declare namespace TextToSpeechPageRequestTtsProvider { + type Raw = "GOOGLE_TTS" | "ELEVEN_LABS" | "UBERDUCK" | "BARK" | "AZURE_TTS" | "OPEN_AI"; +} diff --git a/src/serialization/types/TextToSpeechPageResponse.ts b/src/serialization/types/TextToSpeechPageResponse.ts new file mode 100644 index 0000000..de9c058 --- /dev/null +++ b/src/serialization/types/TextToSpeechPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { TextToSpeechPageOutput } from "./TextToSpeechPageOutput"; + +export const TextToSpeechPageResponse: core.serialization.ObjectSchema< + serializers.TextToSpeechPageResponse.Raw, + Gooey.TextToSpeechPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: TextToSpeechPageOutput, +}); + +export declare namespace TextToSpeechPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: TextToSpeechPageOutput.Raw; + } +} diff --git a/src/serialization/types/TextToSpeechPageStatusResponse.ts b/src/serialization/types/TextToSpeechPageStatusResponse.ts new file mode 100644 index 0000000..4f612bd --- /dev/null +++ b/src/serialization/types/TextToSpeechPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { TextToSpeechPageOutput } from "./TextToSpeechPageOutput"; + +export const TextToSpeechPageStatusResponse: core.serialization.ObjectSchema< + serializers.TextToSpeechPageStatusResponse.Raw, + Gooey.TextToSpeechPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: TextToSpeechPageOutput.optional(), +}); + +export declare namespace TextToSpeechPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: TextToSpeechPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/TrainingDataModel.ts b/src/serialization/types/TrainingDataModel.ts new file mode 100644 index 0000000..f57e4fa --- /dev/null +++ b/src/serialization/types/TrainingDataModel.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const TrainingDataModel: core.serialization.ObjectSchema< + serializers.TrainingDataModel.Raw, + Gooey.TrainingDataModel +> = core.serialization.object({ + prompt: core.serialization.string(), + completion: core.serialization.string(), +}); + +export declare namespace TrainingDataModel { + interface Raw { + prompt: string; + completion: string; + } +} diff --git a/src/serialization/types/TranslationPageOutput.ts b/src/serialization/types/TranslationPageOutput.ts new file mode 100644 index 0000000..36445f7 --- /dev/null +++ b/src/serialization/types/TranslationPageOutput.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const TranslationPageOutput: core.serialization.ObjectSchema< + serializers.TranslationPageOutput.Raw, + Gooey.TranslationPageOutput +> = core.serialization.object({ + outputTexts: core.serialization.property( + "output_texts", + core.serialization.list(core.serialization.string()).optional() + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace TranslationPageOutput { + interface Raw { + output_texts?: string[] | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/TranslationPageRequest.ts b/src/serialization/types/TranslationPageRequest.ts new file mode 100644 index 0000000..4bd4ce4 --- /dev/null +++ b/src/serialization/types/TranslationPageRequest.ts @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { TranslationPageRequestSelectedModel } from "./TranslationPageRequestSelectedModel"; +import { RunSettings } from "./RunSettings"; + +export const TranslationPageRequest: core.serialization.ObjectSchema< + serializers.TranslationPageRequest.Raw, + Gooey.TranslationPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + texts: core.serialization.list(core.serialization.string()).optional(), + selectedModel: core.serialization.property("selected_model", TranslationPageRequestSelectedModel.optional()), + translationSource: core.serialization.property("translation_source", core.serialization.string().optional()), + translationTarget: core.serialization.property("translation_target", core.serialization.string().optional()), + glossaryDocument: core.serialization.property("glossary_document", core.serialization.string().optional()), + settings: RunSettings.optional(), +}); + +export declare namespace TranslationPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + texts?: string[] | null; + selected_model?: TranslationPageRequestSelectedModel.Raw | null; + translation_source?: string | null; + translation_target?: string | null; + glossary_document?: string | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/TranslationPageRequestSelectedModel.ts b/src/serialization/types/TranslationPageRequestSelectedModel.ts new file mode 100644 index 0000000..9147b95 --- /dev/null +++ b/src/serialization/types/TranslationPageRequestSelectedModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const TranslationPageRequestSelectedModel: core.serialization.Schema< + serializers.TranslationPageRequestSelectedModel.Raw, + Gooey.TranslationPageRequestSelectedModel +> = core.serialization.enum_(["google", "ghana_nlp"]); + +export declare namespace TranslationPageRequestSelectedModel { + type Raw = "google" | "ghana_nlp"; +} diff --git a/src/serialization/types/TranslationPageResponse.ts b/src/serialization/types/TranslationPageResponse.ts new file mode 100644 index 0000000..288cbfd --- /dev/null +++ b/src/serialization/types/TranslationPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { TranslationPageOutput } from "./TranslationPageOutput"; + +export const TranslationPageResponse: core.serialization.ObjectSchema< + serializers.TranslationPageResponse.Raw, + Gooey.TranslationPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: TranslationPageOutput, +}); + +export declare namespace TranslationPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: TranslationPageOutput.Raw; + } +} diff --git a/src/serialization/types/TranslationPageStatusResponse.ts b/src/serialization/types/TranslationPageStatusResponse.ts new file mode 100644 index 0000000..be47c8c --- /dev/null +++ b/src/serialization/types/TranslationPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { TranslationPageOutput } from "./TranslationPageOutput"; + +export const TranslationPageStatusResponse: core.serialization.ObjectSchema< + serializers.TranslationPageStatusResponse.Raw, + Gooey.TranslationPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: TranslationPageOutput.optional(), +}); + +export declare namespace TranslationPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: TranslationPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/Trigger.ts b/src/serialization/types/Trigger.ts new file mode 100644 index 0000000..0aa9acf --- /dev/null +++ b/src/serialization/types/Trigger.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Trigger: core.serialization.Schema = core.serialization.enum_([ + "pre", + "post", +]); + +export declare namespace Trigger { + type Raw = "pre" | "post"; +} diff --git a/src/serialization/types/ValidationError.ts b/src/serialization/types/ValidationError.ts new file mode 100644 index 0000000..4c153c0 --- /dev/null +++ b/src/serialization/types/ValidationError.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ValidationErrorLocItem } from "./ValidationErrorLocItem"; + +export const ValidationError: core.serialization.ObjectSchema = + core.serialization.object({ + loc: core.serialization.list(ValidationErrorLocItem), + msg: core.serialization.string(), + type: core.serialization.string(), + }); + +export declare namespace ValidationError { + interface Raw { + loc: ValidationErrorLocItem.Raw[]; + msg: string; + type: string; + } +} diff --git a/src/serialization/types/ValidationErrorLocItem.ts b/src/serialization/types/ValidationErrorLocItem.ts new file mode 100644 index 0000000..d020e5d --- /dev/null +++ b/src/serialization/types/ValidationErrorLocItem.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const ValidationErrorLocItem: core.serialization.Schema< + serializers.ValidationErrorLocItem.Raw, + Gooey.ValidationErrorLocItem +> = core.serialization.undiscriminatedUnion([core.serialization.string(), core.serialization.number()]); + +export declare namespace ValidationErrorLocItem { + type Raw = string | number; +} diff --git a/src/serialization/types/Vcard.ts b/src/serialization/types/Vcard.ts new file mode 100644 index 0000000..ae5f0e2 --- /dev/null +++ b/src/serialization/types/Vcard.ts @@ -0,0 +1,70 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const Vcard: core.serialization.ObjectSchema = core.serialization.object({ + formatName: core.serialization.property("format_name", core.serialization.string()), + email: core.serialization.string().optional(), + gender: core.serialization.string().optional(), + birthdayYear: core.serialization.property("birthday_year", core.serialization.number().optional()), + birthdayMonth: core.serialization.property("birthday_month", core.serialization.number().optional()), + birthdayDay: core.serialization.property("birthday_day", core.serialization.number().optional()), + familyName: core.serialization.property("family_name", core.serialization.string().optional()), + givenName: core.serialization.property("given_name", core.serialization.string().optional()), + middleNames: core.serialization.property("middle_names", core.serialization.string().optional()), + honorificPrefixes: core.serialization.property("honorific_prefixes", core.serialization.string().optional()), + honorificSuffixes: core.serialization.property("honorific_suffixes", core.serialization.string().optional()), + impp: core.serialization.string().optional(), + address: core.serialization.string().optional(), + calendarUrl: core.serialization.property("calendar_url", core.serialization.string().optional()), + commaSeparatedCategories: core.serialization.property( + "comma_separated_categories", + core.serialization.string().optional() + ), + kind: core.serialization.string().optional(), + language: core.serialization.string().optional(), + organization: core.serialization.string().optional(), + photoUrl: core.serialization.property("photo_url", core.serialization.string().optional()), + logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()), + role: core.serialization.string().optional(), + timezone: core.serialization.string().optional(), + jobTitle: core.serialization.property("job_title", core.serialization.string().optional()), + urls: core.serialization.list(core.serialization.string()).optional(), + tel: core.serialization.string().optional(), + note: core.serialization.string().optional(), +}); + +export declare namespace Vcard { + interface Raw { + format_name: string; + email?: string | null; + gender?: string | null; + birthday_year?: number | null; + birthday_month?: number | null; + birthday_day?: number | null; + family_name?: string | null; + given_name?: string | null; + middle_names?: string | null; + honorific_prefixes?: string | null; + honorific_suffixes?: string | null; + impp?: string | null; + address?: string | null; + calendar_url?: string | null; + comma_separated_categories?: string | null; + kind?: string | null; + language?: string | null; + organization?: string | null; + photo_url?: string | null; + logo_url?: string | null; + role?: string | null; + timezone?: string | null; + job_title?: string | null; + urls?: string[] | null; + tel?: string | null; + note?: string | null; + } +} diff --git a/src/serialization/types/VideoBotsPageOutput.ts b/src/serialization/types/VideoBotsPageOutput.ts new file mode 100644 index 0000000..be128db --- /dev/null +++ b/src/serialization/types/VideoBotsPageOutput.ts @@ -0,0 +1,78 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { VideoBotsPageOutputFinalPrompt } from "./VideoBotsPageOutputFinalPrompt"; +import { SearchReference } from "./SearchReference"; +import { VideoBotsPageOutputFinalKeywordQuery } from "./VideoBotsPageOutputFinalKeywordQuery"; +import { ReplyButton } from "./ReplyButton"; +import { CalledFunctionResponse } from "./CalledFunctionResponse"; + +export const VideoBotsPageOutput: core.serialization.ObjectSchema< + serializers.VideoBotsPageOutput.Raw, + Gooey.VideoBotsPageOutput +> = core.serialization.object({ + finalPrompt: core.serialization.property("final_prompt", VideoBotsPageOutputFinalPrompt.optional()), + outputText: core.serialization.property( + "output_text", + core.serialization.list(core.serialization.string()).optional() + ), + outputAudio: core.serialization.property( + "output_audio", + core.serialization.list(core.serialization.string()).optional() + ), + outputVideo: core.serialization.property( + "output_video", + core.serialization.list(core.serialization.string()).optional() + ), + rawInputText: core.serialization.property("raw_input_text", core.serialization.string().optional()), + rawTtsText: core.serialization.property( + "raw_tts_text", + core.serialization.list(core.serialization.string()).optional() + ), + rawOutputText: core.serialization.property( + "raw_output_text", + core.serialization.list(core.serialization.string()).optional() + ), + references: core.serialization.list(SearchReference).optional(), + finalSearchQuery: core.serialization.property("final_search_query", core.serialization.string().optional()), + finalKeywordQuery: core.serialization.property( + "final_keyword_query", + VideoBotsPageOutputFinalKeywordQuery.optional() + ), + outputDocuments: core.serialization.property( + "output_documents", + core.serialization.list(core.serialization.string()).optional() + ), + replyButtons: core.serialization.property("reply_buttons", core.serialization.list(ReplyButton).optional()), + finishReason: core.serialization.property( + "finish_reason", + core.serialization.list(core.serialization.string()).optional() + ), + calledFunctions: core.serialization.property( + "called_functions", + core.serialization.list(CalledFunctionResponse).optional() + ), +}); + +export declare namespace VideoBotsPageOutput { + interface Raw { + final_prompt?: VideoBotsPageOutputFinalPrompt.Raw | null; + output_text?: string[] | null; + output_audio?: string[] | null; + output_video?: string[] | null; + raw_input_text?: string | null; + raw_tts_text?: string[] | null; + raw_output_text?: string[] | null; + references?: SearchReference.Raw[] | null; + final_search_query?: string | null; + final_keyword_query?: VideoBotsPageOutputFinalKeywordQuery.Raw | null; + output_documents?: string[] | null; + reply_buttons?: ReplyButton.Raw[] | null; + finish_reason?: string[] | null; + called_functions?: CalledFunctionResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/VideoBotsPageOutputFinalKeywordQuery.ts b/src/serialization/types/VideoBotsPageOutputFinalKeywordQuery.ts new file mode 100644 index 0000000..df3bc5f --- /dev/null +++ b/src/serialization/types/VideoBotsPageOutputFinalKeywordQuery.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageOutputFinalKeywordQuery: core.serialization.Schema< + serializers.VideoBotsPageOutputFinalKeywordQuery.Raw, + Gooey.VideoBotsPageOutputFinalKeywordQuery +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.list(core.serialization.string()), +]); + +export declare namespace VideoBotsPageOutputFinalKeywordQuery { + type Raw = string | string[]; +} diff --git a/src/serialization/types/VideoBotsPageOutputFinalPrompt.ts b/src/serialization/types/VideoBotsPageOutputFinalPrompt.ts new file mode 100644 index 0000000..8f2856f --- /dev/null +++ b/src/serialization/types/VideoBotsPageOutputFinalPrompt.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { ConversationEntry } from "./ConversationEntry"; + +export const VideoBotsPageOutputFinalPrompt: core.serialization.Schema< + serializers.VideoBotsPageOutputFinalPrompt.Raw, + Gooey.VideoBotsPageOutputFinalPrompt +> = core.serialization.undiscriminatedUnion([core.serialization.string(), core.serialization.list(ConversationEntry)]); + +export declare namespace VideoBotsPageOutputFinalPrompt { + type Raw = string | ConversationEntry.Raw[]; +} diff --git a/src/serialization/types/VideoBotsPageRequest.ts b/src/serialization/types/VideoBotsPageRequest.ts new file mode 100644 index 0000000..6db1b7e --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequest.ts @@ -0,0 +1,170 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeFunction } from "./RecipeFunction"; +import { ConversationEntry } from "./ConversationEntry"; +import { VideoBotsPageRequestSelectedModel } from "./VideoBotsPageRequestSelectedModel"; +import { VideoBotsPageRequestEmbeddingModel } from "./VideoBotsPageRequestEmbeddingModel"; +import { VideoBotsPageRequestCitationStyle } from "./VideoBotsPageRequestCitationStyle"; +import { VideoBotsPageRequestAsrModel } from "./VideoBotsPageRequestAsrModel"; +import { VideoBotsPageRequestTranslationModel } from "./VideoBotsPageRequestTranslationModel"; +import { VideoBotsPageRequestLipsyncModel } from "./VideoBotsPageRequestLipsyncModel"; +import { LlmTools } from "./LlmTools"; +import { VideoBotsPageRequestTtsProvider } from "./VideoBotsPageRequestTtsProvider"; +import { VideoBotsPageRequestOpenaiVoiceName } from "./VideoBotsPageRequestOpenaiVoiceName"; +import { VideoBotsPageRequestOpenaiTtsModel } from "./VideoBotsPageRequestOpenaiTtsModel"; +import { SadTalkerSettings } from "./SadTalkerSettings"; +import { RunSettings } from "./RunSettings"; + +export const VideoBotsPageRequest: core.serialization.ObjectSchema< + serializers.VideoBotsPageRequest.Raw, + Gooey.VideoBotsPageRequest +> = core.serialization.object({ + functions: core.serialization.list(RecipeFunction).optional(), + variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + inputPrompt: core.serialization.property("input_prompt", core.serialization.string().optional()), + inputAudio: core.serialization.property("input_audio", core.serialization.string().optional()), + inputImages: core.serialization.property( + "input_images", + core.serialization.list(core.serialization.string()).optional() + ), + inputDocuments: core.serialization.property( + "input_documents", + core.serialization.list(core.serialization.string()).optional() + ), + docExtractUrl: core.serialization.property("doc_extract_url", core.serialization.string().optional()), + messages: core.serialization.list(ConversationEntry).optional(), + botScript: core.serialization.property("bot_script", core.serialization.string().optional()), + selectedModel: core.serialization.property("selected_model", VideoBotsPageRequestSelectedModel.optional()), + documentModel: core.serialization.property("document_model", core.serialization.string().optional()), + avoidRepetition: core.serialization.property("avoid_repetition", core.serialization.boolean().optional()), + numOutputs: core.serialization.property("num_outputs", core.serialization.number().optional()), + quality: core.serialization.number().optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + samplingTemperature: core.serialization.property("sampling_temperature", core.serialization.number().optional()), + taskInstructions: core.serialization.property("task_instructions", core.serialization.string().optional()), + queryInstructions: core.serialization.property("query_instructions", core.serialization.string().optional()), + keywordInstructions: core.serialization.property("keyword_instructions", core.serialization.string().optional()), + documents: core.serialization.list(core.serialization.string()).optional(), + maxReferences: core.serialization.property("max_references", core.serialization.number().optional()), + maxContextWords: core.serialization.property("max_context_words", core.serialization.number().optional()), + scrollJump: core.serialization.property("scroll_jump", core.serialization.number().optional()), + embeddingModel: core.serialization.property("embedding_model", VideoBotsPageRequestEmbeddingModel.optional()), + denseWeight: core.serialization.property("dense_weight", core.serialization.number().optional()), + citationStyle: core.serialization.property("citation_style", VideoBotsPageRequestCitationStyle.optional()), + useUrlShortener: core.serialization.property("use_url_shortener", core.serialization.boolean().optional()), + asrModel: core.serialization.property("asr_model", VideoBotsPageRequestAsrModel.optional()), + asrLanguage: core.serialization.property("asr_language", core.serialization.string().optional()), + translationModel: core.serialization.property("translation_model", VideoBotsPageRequestTranslationModel.optional()), + userLanguage: core.serialization.property("user_language", core.serialization.string().optional()), + inputGlossaryDocument: core.serialization.property( + "input_glossary_document", + core.serialization.string().optional() + ), + outputGlossaryDocument: core.serialization.property( + "output_glossary_document", + core.serialization.string().optional() + ), + lipsyncModel: core.serialization.property("lipsync_model", VideoBotsPageRequestLipsyncModel.optional()), + tools: core.serialization.list(LlmTools).optional(), + ttsProvider: core.serialization.property("tts_provider", VideoBotsPageRequestTtsProvider.optional()), + uberduckVoiceName: core.serialization.property("uberduck_voice_name", core.serialization.string().optional()), + uberduckSpeakingRate: core.serialization.property("uberduck_speaking_rate", core.serialization.number().optional()), + googleVoiceName: core.serialization.property("google_voice_name", core.serialization.string().optional()), + googleSpeakingRate: core.serialization.property("google_speaking_rate", core.serialization.number().optional()), + googlePitch: core.serialization.property("google_pitch", core.serialization.number().optional()), + barkHistoryPrompt: core.serialization.property("bark_history_prompt", core.serialization.string().optional()), + elevenlabsVoiceName: core.serialization.property("elevenlabs_voice_name", core.serialization.string().optional()), + elevenlabsApiKey: core.serialization.property("elevenlabs_api_key", core.serialization.string().optional()), + elevenlabsVoiceId: core.serialization.property("elevenlabs_voice_id", core.serialization.string().optional()), + elevenlabsModel: core.serialization.property("elevenlabs_model", core.serialization.string().optional()), + elevenlabsStability: core.serialization.property("elevenlabs_stability", core.serialization.number().optional()), + elevenlabsSimilarityBoost: core.serialization.property( + "elevenlabs_similarity_boost", + core.serialization.number().optional() + ), + elevenlabsStyle: core.serialization.property("elevenlabs_style", core.serialization.number().optional()), + elevenlabsSpeakerBoost: core.serialization.property( + "elevenlabs_speaker_boost", + core.serialization.boolean().optional() + ), + azureVoiceName: core.serialization.property("azure_voice_name", core.serialization.string().optional()), + openaiVoiceName: core.serialization.property("openai_voice_name", VideoBotsPageRequestOpenaiVoiceName.optional()), + openaiTtsModel: core.serialization.property("openai_tts_model", VideoBotsPageRequestOpenaiTtsModel.optional()), + inputFace: core.serialization.property("input_face", core.serialization.string().optional()), + facePaddingTop: core.serialization.property("face_padding_top", core.serialization.number().optional()), + facePaddingBottom: core.serialization.property("face_padding_bottom", core.serialization.number().optional()), + facePaddingLeft: core.serialization.property("face_padding_left", core.serialization.number().optional()), + facePaddingRight: core.serialization.property("face_padding_right", core.serialization.number().optional()), + sadtalkerSettings: core.serialization.property("sadtalker_settings", SadTalkerSettings.optional()), + settings: RunSettings.optional(), +}); + +export declare namespace VideoBotsPageRequest { + interface Raw { + functions?: RecipeFunction.Raw[] | null; + variables?: Record | null; + input_prompt?: string | null; + input_audio?: string | null; + input_images?: string[] | null; + input_documents?: string[] | null; + doc_extract_url?: string | null; + messages?: ConversationEntry.Raw[] | null; + bot_script?: string | null; + selected_model?: VideoBotsPageRequestSelectedModel.Raw | null; + document_model?: string | null; + avoid_repetition?: boolean | null; + num_outputs?: number | null; + quality?: number | null; + max_tokens?: number | null; + sampling_temperature?: number | null; + task_instructions?: string | null; + query_instructions?: string | null; + keyword_instructions?: string | null; + documents?: string[] | null; + max_references?: number | null; + max_context_words?: number | null; + scroll_jump?: number | null; + embedding_model?: VideoBotsPageRequestEmbeddingModel.Raw | null; + dense_weight?: number | null; + citation_style?: VideoBotsPageRequestCitationStyle.Raw | null; + use_url_shortener?: boolean | null; + asr_model?: VideoBotsPageRequestAsrModel.Raw | null; + asr_language?: string | null; + translation_model?: VideoBotsPageRequestTranslationModel.Raw | null; + user_language?: string | null; + input_glossary_document?: string | null; + output_glossary_document?: string | null; + lipsync_model?: VideoBotsPageRequestLipsyncModel.Raw | null; + tools?: LlmTools.Raw[] | null; + tts_provider?: VideoBotsPageRequestTtsProvider.Raw | null; + uberduck_voice_name?: string | null; + uberduck_speaking_rate?: number | null; + google_voice_name?: string | null; + google_speaking_rate?: number | null; + google_pitch?: number | null; + bark_history_prompt?: string | null; + elevenlabs_voice_name?: string | null; + elevenlabs_api_key?: string | null; + elevenlabs_voice_id?: string | null; + elevenlabs_model?: string | null; + elevenlabs_stability?: number | null; + elevenlabs_similarity_boost?: number | null; + elevenlabs_style?: number | null; + elevenlabs_speaker_boost?: boolean | null; + azure_voice_name?: string | null; + openai_voice_name?: VideoBotsPageRequestOpenaiVoiceName.Raw | null; + openai_tts_model?: VideoBotsPageRequestOpenaiTtsModel.Raw | null; + input_face?: string | null; + face_padding_top?: number | null; + face_padding_bottom?: number | null; + face_padding_left?: number | null; + face_padding_right?: number | null; + sadtalker_settings?: SadTalkerSettings.Raw | null; + settings?: RunSettings.Raw | null; + } +} diff --git a/src/serialization/types/VideoBotsPageRequestAsrModel.ts b/src/serialization/types/VideoBotsPageRequestAsrModel.ts new file mode 100644 index 0000000..fab02dc --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestAsrModel.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestAsrModel: core.serialization.Schema< + serializers.VideoBotsPageRequestAsrModel.Raw, + Gooey.VideoBotsPageRequestAsrModel +> = core.serialization.enum_([ + "whisper_large_v2", + "whisper_large_v3", + "whisper_hindi_large_v2", + "whisper_telugu_large_v2", + "nemo_english", + "nemo_hindi", + "vakyansh_bhojpuri", + "gcp_v1", + "usm", + "deepgram", + "azure", + "seamless_m4t", + "mms_1b_all", +]); + +export declare namespace VideoBotsPageRequestAsrModel { + type Raw = + | "whisper_large_v2" + | "whisper_large_v3" + | "whisper_hindi_large_v2" + | "whisper_telugu_large_v2" + | "nemo_english" + | "nemo_hindi" + | "vakyansh_bhojpuri" + | "gcp_v1" + | "usm" + | "deepgram" + | "azure" + | "seamless_m4t" + | "mms_1b_all"; +} diff --git a/src/serialization/types/VideoBotsPageRequestCitationStyle.ts b/src/serialization/types/VideoBotsPageRequestCitationStyle.ts new file mode 100644 index 0000000..ab5e826 --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestCitationStyle.ts @@ -0,0 +1,49 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestCitationStyle: core.serialization.Schema< + serializers.VideoBotsPageRequestCitationStyle.Raw, + Gooey.VideoBotsPageRequestCitationStyle +> = core.serialization.enum_([ + "number", + "title", + "url", + "symbol", + "markdown", + "html", + "slack_mrkdwn", + "plaintext", + "number_markdown", + "number_html", + "number_slack_mrkdwn", + "number_plaintext", + "symbol_markdown", + "symbol_html", + "symbol_slack_mrkdwn", + "symbol_plaintext", +]); + +export declare namespace VideoBotsPageRequestCitationStyle { + type Raw = + | "number" + | "title" + | "url" + | "symbol" + | "markdown" + | "html" + | "slack_mrkdwn" + | "plaintext" + | "number_markdown" + | "number_html" + | "number_slack_mrkdwn" + | "number_plaintext" + | "symbol_markdown" + | "symbol_html" + | "symbol_slack_mrkdwn" + | "symbol_plaintext"; +} diff --git a/src/serialization/types/VideoBotsPageRequestEmbeddingModel.ts b/src/serialization/types/VideoBotsPageRequestEmbeddingModel.ts new file mode 100644 index 0000000..93f8b5e --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestEmbeddingModel.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestEmbeddingModel: core.serialization.Schema< + serializers.VideoBotsPageRequestEmbeddingModel.Raw, + Gooey.VideoBotsPageRequestEmbeddingModel +> = core.serialization.enum_([ + "openai_3_large", + "openai_3_small", + "openai_ada_2", + "e5_large_v2", + "e5_base_v2", + "multilingual_e5_base", + "multilingual_e5_large", + "gte_large", + "gte_base", +]); + +export declare namespace VideoBotsPageRequestEmbeddingModel { + type Raw = + | "openai_3_large" + | "openai_3_small" + | "openai_ada_2" + | "e5_large_v2" + | "e5_base_v2" + | "multilingual_e5_base" + | "multilingual_e5_large" + | "gte_large" + | "gte_base"; +} diff --git a/src/serialization/types/VideoBotsPageRequestLipsyncModel.ts b/src/serialization/types/VideoBotsPageRequestLipsyncModel.ts new file mode 100644 index 0000000..52be8bd --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestLipsyncModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestLipsyncModel: core.serialization.Schema< + serializers.VideoBotsPageRequestLipsyncModel.Raw, + Gooey.VideoBotsPageRequestLipsyncModel +> = core.serialization.enum_(["Wav2Lip", "SadTalker"]); + +export declare namespace VideoBotsPageRequestLipsyncModel { + type Raw = "Wav2Lip" | "SadTalker"; +} diff --git a/src/serialization/types/VideoBotsPageRequestOpenaiTtsModel.ts b/src/serialization/types/VideoBotsPageRequestOpenaiTtsModel.ts new file mode 100644 index 0000000..94cf72f --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestOpenaiTtsModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestOpenaiTtsModel: core.serialization.Schema< + serializers.VideoBotsPageRequestOpenaiTtsModel.Raw, + Gooey.VideoBotsPageRequestOpenaiTtsModel +> = core.serialization.enum_(["tts_1", "tts_1_hd"]); + +export declare namespace VideoBotsPageRequestOpenaiTtsModel { + type Raw = "tts_1" | "tts_1_hd"; +} diff --git a/src/serialization/types/VideoBotsPageRequestOpenaiVoiceName.ts b/src/serialization/types/VideoBotsPageRequestOpenaiVoiceName.ts new file mode 100644 index 0000000..52c13e8 --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestOpenaiVoiceName.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestOpenaiVoiceName: core.serialization.Schema< + serializers.VideoBotsPageRequestOpenaiVoiceName.Raw, + Gooey.VideoBotsPageRequestOpenaiVoiceName +> = core.serialization.enum_(["alloy", "echo", "fable", "onyx", "nova", "shimmer"]); + +export declare namespace VideoBotsPageRequestOpenaiVoiceName { + type Raw = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"; +} diff --git a/src/serialization/types/VideoBotsPageRequestSelectedModel.ts b/src/serialization/types/VideoBotsPageRequestSelectedModel.ts new file mode 100644 index 0000000..eafcf99 --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestSelectedModel.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestSelectedModel: core.serialization.Schema< + serializers.VideoBotsPageRequestSelectedModel.Raw, + Gooey.VideoBotsPageRequestSelectedModel +> = core.serialization.enum_([ + "gpt_4_o", + "gpt_4_turbo_vision", + "gpt_4_vision", + "gpt_4_turbo", + "gpt_4", + "gpt_4_32k", + "gpt_3_5_turbo", + "gpt_3_5_turbo_16k", + "gpt_3_5_turbo_instruct", + "llama3_70b", + "llama3_8b", + "llama2_70b_chat", + "mixtral_8x7b_instruct_0_1", + "gemma_7b_it", + "gemini_1_5_pro", + "gemini_1_pro_vision", + "gemini_1_pro", + "palm2_chat", + "palm2_text", + "claude_3_5_sonnet", + "claude_3_opus", + "claude_3_sonnet", + "claude_3_haiku", + "sea_lion_7b_instruct", + "text_davinci_003", + "text_davinci_002", + "code_davinci_002", + "text_curie_001", + "text_babbage_001", + "text_ada_001", +]); + +export declare namespace VideoBotsPageRequestSelectedModel { + type Raw = + | "gpt_4_o" + | "gpt_4_turbo_vision" + | "gpt_4_vision" + | "gpt_4_turbo" + | "gpt_4" + | "gpt_4_32k" + | "gpt_3_5_turbo" + | "gpt_3_5_turbo_16k" + | "gpt_3_5_turbo_instruct" + | "llama3_70b" + | "llama3_8b" + | "llama2_70b_chat" + | "mixtral_8x7b_instruct_0_1" + | "gemma_7b_it" + | "gemini_1_5_pro" + | "gemini_1_pro_vision" + | "gemini_1_pro" + | "palm2_chat" + | "palm2_text" + | "claude_3_5_sonnet" + | "claude_3_opus" + | "claude_3_sonnet" + | "claude_3_haiku" + | "sea_lion_7b_instruct" + | "text_davinci_003" + | "text_davinci_002" + | "code_davinci_002" + | "text_curie_001" + | "text_babbage_001" + | "text_ada_001"; +} diff --git a/src/serialization/types/VideoBotsPageRequestTranslationModel.ts b/src/serialization/types/VideoBotsPageRequestTranslationModel.ts new file mode 100644 index 0000000..8d6c631 --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestTranslationModel.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestTranslationModel: core.serialization.Schema< + serializers.VideoBotsPageRequestTranslationModel.Raw, + Gooey.VideoBotsPageRequestTranslationModel +> = core.serialization.enum_(["google", "ghana_nlp"]); + +export declare namespace VideoBotsPageRequestTranslationModel { + type Raw = "google" | "ghana_nlp"; +} diff --git a/src/serialization/types/VideoBotsPageRequestTtsProvider.ts b/src/serialization/types/VideoBotsPageRequestTtsProvider.ts new file mode 100644 index 0000000..e90183a --- /dev/null +++ b/src/serialization/types/VideoBotsPageRequestTtsProvider.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; + +export const VideoBotsPageRequestTtsProvider: core.serialization.Schema< + serializers.VideoBotsPageRequestTtsProvider.Raw, + Gooey.VideoBotsPageRequestTtsProvider +> = core.serialization.enum_(["GOOGLE_TTS", "ELEVEN_LABS", "UBERDUCK", "BARK", "AZURE_TTS", "OPEN_AI"]); + +export declare namespace VideoBotsPageRequestTtsProvider { + type Raw = "GOOGLE_TTS" | "ELEVEN_LABS" | "UBERDUCK" | "BARK" | "AZURE_TTS" | "OPEN_AI"; +} diff --git a/src/serialization/types/VideoBotsPageResponse.ts b/src/serialization/types/VideoBotsPageResponse.ts new file mode 100644 index 0000000..de06312 --- /dev/null +++ b/src/serialization/types/VideoBotsPageResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { VideoBotsPageOutput } from "./VideoBotsPageOutput"; + +export const VideoBotsPageResponse: core.serialization.ObjectSchema< + serializers.VideoBotsPageResponse.Raw, + Gooey.VideoBotsPageResponse +> = core.serialization.object({ + id: core.serialization.string(), + url: core.serialization.string(), + createdAt: core.serialization.property("created_at", core.serialization.string()), + output: VideoBotsPageOutput, +}); + +export declare namespace VideoBotsPageResponse { + interface Raw { + id: string; + url: string; + created_at: string; + output: VideoBotsPageOutput.Raw; + } +} diff --git a/src/serialization/types/VideoBotsPageStatusResponse.ts b/src/serialization/types/VideoBotsPageStatusResponse.ts new file mode 100644 index 0000000..5a807a3 --- /dev/null +++ b/src/serialization/types/VideoBotsPageStatusResponse.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; +import { RecipeRunState } from "./RecipeRunState"; +import { VideoBotsPageOutput } from "./VideoBotsPageOutput"; + +export const VideoBotsPageStatusResponse: core.serialization.ObjectSchema< + serializers.VideoBotsPageStatusResponse.Raw, + Gooey.VideoBotsPageStatusResponse +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string()), + webUrl: core.serialization.property("web_url", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.string()), + runTimeSec: core.serialization.property("run_time_sec", core.serialization.number()), + status: RecipeRunState, + detail: core.serialization.string(), + output: VideoBotsPageOutput.optional(), +}); + +export declare namespace VideoBotsPageStatusResponse { + interface Raw { + run_id: string; + web_url: string; + created_at: string; + run_time_sec: number; + status: RecipeRunState.Raw; + detail: string; + output?: VideoBotsPageOutput.Raw | null; + } +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts new file mode 100644 index 0000000..078fa81 --- /dev/null +++ b/src/serialization/types/index.ts @@ -0,0 +1,250 @@ +export * from "./Function"; +export * from "./AggFunction"; +export * from "./AggFunctionResult"; +export * from "./AsrChunk"; +export * from "./AsrOutputJson"; +export * from "./AsrPageOutputOutputTextItem"; +export * from "./AsrPageOutput"; +export * from "./AsrPageRequestSelectedModel"; +export * from "./AsrPageRequestTranslationModel"; +export * from "./AsrPageRequestOutputFormat"; +export * from "./AsrPageRequest"; +export * from "./AsrPageResponse"; +export * from "./AsrPageStatusResponse"; +export * from "./AsyncApiResponseModelV3"; +export * from "./BalanceResponse"; +export * from "./BotBroadcastFilters"; +export * from "./BulkEvalPageOutput"; +export * from "./BulkEvalPageRequestSelectedModel"; +export * from "./BulkEvalPageRequest"; +export * from "./BulkEvalPageResponse"; +export * from "./BulkEvalPageStatusResponse"; +export * from "./BulkRunnerPageOutput"; +export * from "./BulkRunnerPageRequest"; +export * from "./BulkRunnerPageResponse"; +export * from "./BulkRunnerPageStatusResponse"; +export * from "./ButtonPressed"; +export * from "./Trigger"; +export * from "./CalledFunctionResponse"; +export * from "./ChatCompletionContentPartImageParam"; +export * from "./ChatCompletionContentPartTextParam"; +export * from "./ChyronPlantPageOutput"; +export * from "./ChyronPlantPageRequest"; +export * from "./ChyronPlantPageResponse"; +export * from "./ChyronPlantPageStatusResponse"; +export * from "./CompareLlmPageOutput"; +export * from "./CompareLlmPageRequestSelectedModelsItem"; +export * from "./CompareLlmPageRequestResponseFormatType"; +export * from "./CompareLlmPageRequest"; +export * from "./CompareLlmPageResponse"; +export * from "./CompareLlmPageStatusResponse"; +export * from "./CompareText2ImgPageOutput"; +export * from "./CompareText2ImgPageRequestSelectedModelsItem"; +export * from "./Scheduler"; +export * from "./CompareText2ImgPageRequest"; +export * from "./CompareText2ImgPageResponse"; +export * from "./CompareText2ImgPageStatusResponse"; +export * from "./CompareUpscalerPageOutput"; +export * from "./CompareUpscalerPageRequestSelectedModelsItem"; +export * from "./CompareUpscalerPageRequest"; +export * from "./CompareUpscalerPageResponse"; +export * from "./CompareUpscalerPageStatusResponse"; +export * from "./Level"; +export * from "./ConsoleLogs"; +export * from "./Role"; +export * from "./ConversationEntryContentItem"; +export * from "./Content"; +export * from "./ConversationEntry"; +export * from "./ConversationStart"; +export * from "./CreateStreamResponse"; +export * from "./DeforumSdPageOutput"; +export * from "./DeforumSdPageRequestSelectedModel"; +export * from "./DeforumSdPageRequest"; +export * from "./DeforumSdPageResponse"; +export * from "./DeforumSdPageStatusResponse"; +export * from "./DocExtractPageOutput"; +export * from "./DocExtractPageRequestSelectedAsrModel"; +export * from "./DocExtractPageRequestSelectedModel"; +export * from "./DocExtractPageRequest"; +export * from "./DocExtractPageResponse"; +export * from "./DocExtractPageStatusResponse"; +export * from "./DocSearchPageOutput"; +export * from "./DocSearchPageRequestKeywordQuery"; +export * from "./DocSearchPageRequestEmbeddingModel"; +export * from "./DocSearchPageRequestSelectedModel"; +export * from "./DocSearchPageRequestCitationStyle"; +export * from "./DocSearchPageRequest"; +export * from "./DocSearchPageResponse"; +export * from "./DocSearchPageStatusResponse"; +export * from "./DocSummaryPageOutput"; +export * from "./DocSummaryPageRequestSelectedModel"; +export * from "./DocSummaryPageRequestSelectedAsrModel"; +export * from "./DocSummaryPageRequest"; +export * from "./DocSummaryPageResponse"; +export * from "./DocSummaryPageStatusResponse"; +export * from "./EmailFaceInpaintingPageOutput"; +export * from "./EmailFaceInpaintingPageRequestSelectedModel"; +export * from "./EmailFaceInpaintingPageRequest"; +export * from "./EmailFaceInpaintingPageResponse"; +export * from "./EmailFaceInpaintingPageStatusResponse"; +export * from "./EmbeddingsPageOutput"; +export * from "./EmbeddingsPageRequestSelectedModel"; +export * from "./EmbeddingsPageRequest"; +export * from "./EmbeddingsPageResponse"; +export * from "./EmbeddingsPageStatusResponse"; +export * from "./EvalPrompt"; +export * from "./FaceInpaintingPageOutput"; +export * from "./FaceInpaintingPageRequestSelectedModel"; +export * from "./FaceInpaintingPageRequest"; +export * from "./FaceInpaintingPageResponse"; +export * from "./FaceInpaintingPageStatusResponse"; +export * from "./FailedReponseModelV2"; +export * from "./FailedResponseDetail"; +export * from "./FinalResponse"; +export * from "./FunctionsPageOutput"; +export * from "./FunctionsPageRequest"; +export * from "./FunctionsPageResponse"; +export * from "./FunctionsPageStatusResponse"; +export * from "./GenericErrorResponse"; +export * from "./GenericErrorResponseDetail"; +export * from "./GoogleGptPageOutput"; +export * from "./GoogleGptPageRequestSelectedModel"; +export * from "./GoogleGptPageRequestEmbeddingModel"; +export * from "./GoogleGptPageRequest"; +export * from "./GoogleGptPageResponse"; +export * from "./GoogleGptPageStatusResponse"; +export * from "./GoogleImageGenPageOutput"; +export * from "./GoogleImageGenPageRequestSelectedModel"; +export * from "./GoogleImageGenPageRequest"; +export * from "./GoogleImageGenPageResponse"; +export * from "./GoogleImageGenPageStatusResponse"; +export * from "./HttpValidationError"; +export * from "./ImageSegmentationPageOutput"; +export * from "./ImageSegmentationPageRequestSelectedModel"; +export * from "./ImageSegmentationPageRequest"; +export * from "./ImageSegmentationPageResponse"; +export * from "./ImageSegmentationPageStatusResponse"; +export * from "./Detail"; +export * from "./ImageUrl"; +export * from "./Img2ImgPageOutput"; +export * from "./Img2ImgPageRequestSelectedModel"; +export * from "./Img2ImgPageRequestSelectedControlnetModelItem"; +export * from "./Img2ImgPageRequestSelectedControlnetModel"; +export * from "./Img2ImgPageRequest"; +export * from "./Img2ImgPageResponse"; +export * from "./Img2ImgPageStatusResponse"; +export * from "./LlmTools"; +export * from "./LetterWriterPageOutput"; +export * from "./LetterWriterPageRequest"; +export * from "./LetterWriterPageResponse"; +export * from "./LetterWriterPageStatusResponse"; +export * from "./LipsyncPageOutput"; +export * from "./LipsyncPageRequestSelectedModel"; +export * from "./LipsyncPageRequest"; +export * from "./LipsyncPageResponse"; +export * from "./LipsyncPageStatusResponse"; +export * from "./LipsyncTtsPageOutput"; +export * from "./LipsyncTtsPageRequestTtsProvider"; +export * from "./LipsyncTtsPageRequestOpenaiVoiceName"; +export * from "./LipsyncTtsPageRequestOpenaiTtsModel"; +export * from "./LipsyncTtsPageRequestSelectedModel"; +export * from "./LipsyncTtsPageRequest"; +export * from "./LipsyncTtsPageResponse"; +export * from "./LipsyncTtsPageStatusResponse"; +export * from "./MessagePart"; +export * from "./ObjectInpaintingPageOutput"; +export * from "./ObjectInpaintingPageRequestSelectedModel"; +export * from "./ObjectInpaintingPageRequest"; +export * from "./ObjectInpaintingPageResponse"; +export * from "./ObjectInpaintingPageStatusResponse"; +export * from "./Prompt"; +export * from "./PromptTreeNode"; +export * from "./QrCodeGeneratorPageOutput"; +export * from "./QrCodeGeneratorPageRequestImagePromptControlnetModelsItem"; +export * from "./QrCodeGeneratorPageRequestSelectedModel"; +export * from "./QrCodeGeneratorPageRequestSelectedControlnetModelItem"; +export * from "./QrCodeGeneratorPageRequest"; +export * from "./QrCodeGeneratorPageResponse"; +export * from "./QrCodeGeneratorPageStatusResponse"; +export * from "./RecipeFunction"; +export * from "./RecipeRunState"; +export * from "./RelatedDocSearchResponse"; +export * from "./RelatedGoogleGptResponse"; +export * from "./RelatedQnADocPageOutput"; +export * from "./RelatedQnADocPageRequestKeywordQuery"; +export * from "./RelatedQnADocPageRequestEmbeddingModel"; +export * from "./RelatedQnADocPageRequestSelectedModel"; +export * from "./RelatedQnADocPageRequestCitationStyle"; +export * from "./RelatedQnADocPageRequest"; +export * from "./RelatedQnADocPageResponse"; +export * from "./RelatedQnADocPageStatusResponse"; +export * from "./RelatedQnAPageOutput"; +export * from "./RelatedQnAPageRequestSelectedModel"; +export * from "./RelatedQnAPageRequestEmbeddingModel"; +export * from "./RelatedQnAPageRequest"; +export * from "./RelatedQnAPageResponse"; +export * from "./RelatedQnAPageStatusResponse"; +export * from "./ReplyButton"; +export * from "./ResponseModelFinalPrompt"; +export * from "./ResponseModelFinalKeywordQuery"; +export * from "./ResponseModel"; +export * from "./RunSettingsRetentionPolicy"; +export * from "./RunSettings"; +export * from "./RunStart"; +export * from "./SeoSummaryPageOutput"; +export * from "./SeoSummaryPageRequestSelectedModel"; +export * from "./SeoSummaryPageRequest"; +export * from "./SeoSummaryPageResponse"; +export * from "./SeoSummaryPageStatusResponse"; +export * from "./Preprocess"; +export * from "./SadTalkerSettings"; +export * from "./SearchReference"; +export * from "./SerpSearchLocation"; +export * from "./SerpSearchType"; +export * from "./SmartGptPageOutput"; +export * from "./SmartGptPageRequestSelectedModel"; +export * from "./SmartGptPageRequest"; +export * from "./SmartGptPageResponse"; +export * from "./SmartGptPageStatusResponse"; +export * from "./SocialLookupEmailPageOutput"; +export * from "./SocialLookupEmailPageRequestSelectedModel"; +export * from "./SocialLookupEmailPageRequest"; +export * from "./SocialLookupEmailPageResponse"; +export * from "./SocialLookupEmailPageStatusResponse"; +export * from "./StreamError"; +export * from "./Text2AudioPageOutput"; +export * from "./Text2AudioPageRequest"; +export * from "./Text2AudioPageResponse"; +export * from "./Text2AudioPageStatusResponse"; +export * from "./TextToSpeechPageOutput"; +export * from "./TextToSpeechPageRequestTtsProvider"; +export * from "./TextToSpeechPageRequestOpenaiVoiceName"; +export * from "./TextToSpeechPageRequestOpenaiTtsModel"; +export * from "./TextToSpeechPageRequest"; +export * from "./TextToSpeechPageResponse"; +export * from "./TextToSpeechPageStatusResponse"; +export * from "./TrainingDataModel"; +export * from "./TranslationPageOutput"; +export * from "./TranslationPageRequestSelectedModel"; +export * from "./TranslationPageRequest"; +export * from "./TranslationPageResponse"; +export * from "./TranslationPageStatusResponse"; +export * from "./Vcard"; +export * from "./ValidationErrorLocItem"; +export * from "./ValidationError"; +export * from "./VideoBotsPageOutputFinalPrompt"; +export * from "./VideoBotsPageOutputFinalKeywordQuery"; +export * from "./VideoBotsPageOutput"; +export * from "./VideoBotsPageRequestSelectedModel"; +export * from "./VideoBotsPageRequestEmbeddingModel"; +export * from "./VideoBotsPageRequestCitationStyle"; +export * from "./VideoBotsPageRequestAsrModel"; +export * from "./VideoBotsPageRequestTranslationModel"; +export * from "./VideoBotsPageRequestLipsyncModel"; +export * from "./VideoBotsPageRequestTtsProvider"; +export * from "./VideoBotsPageRequestOpenaiVoiceName"; +export * from "./VideoBotsPageRequestOpenaiTtsModel"; +export * from "./VideoBotsPageRequest"; +export * from "./VideoBotsPageResponse"; +export * from "./VideoBotsPageStatusResponse"; +export * from "./AnimationPrompt"; diff --git a/tests/custom.test.ts b/tests/custom.test.ts new file mode 100644 index 0000000..7f5e031 --- /dev/null +++ b/tests/custom.test.ts @@ -0,0 +1,13 @@ +/** + * This is a custom test file, if you wish to add more tests + * to your SDK. + * Be sure to mark this file in `.fernignore`. + * + * If you include example requests/responses in your fern definition, + * you will have tests automatically generated for you. + */ +describe("test", () => { + it("default", () => { + expect(true).toBe(true); + }); +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..538c94f --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "extendedDiagnostics": true, + "strict": true, + "target": "ES6", + "module": "CommonJS", + "moduleResolution": "node", + "esModuleInterop": true, + "skipLibCheck": true, + "declaration": true, + "outDir": "dist", + "rootDir": "src", + "baseUrl": "src" + }, + "include": ["src"], + "exclude": [] +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..6e75873 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,2677 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + +"@babel/compat-data@^7.24.8": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.0.tgz#6b226a5da3a686db3c30519750e071dce292ad95" + integrity sha512-P4fwKI2mjEb3ZU5cnMJzvRsRKGBUcs8jvxIoRmr6ufAY9Xk2Bz7JubRTTivkw55c7WQJfTECeqYVa+HZ0FzREg== + +"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": + version "7.24.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.9.tgz#dc07c9d307162c97fa9484ea997ade65841c7c82" + integrity sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.9" + "@babel/helper-compilation-targets" "^7.24.8" + "@babel/helper-module-transforms" "^7.24.9" + "@babel/helpers" "^7.24.8" + "@babel/parser" "^7.24.8" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.8" + "@babel/types" "^7.24.9" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.24.9", "@babel/generator@^7.25.0", "@babel/generator@^7.7.2": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.0.tgz#f858ddfa984350bc3d3b7f125073c9af6988f18e" + integrity sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw== + dependencies: + "@babel/types" "^7.25.0" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz#b607c3161cd9d1744977d4f97139572fe778c271" + integrity sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw== + dependencies: + "@babel/compat-data" "^7.24.8" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-module-transforms@^7.24.9": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.0.tgz#3ffc23c473a2769a7e40d3274495bd559fdd2ecc" + integrity sha512-bIkOa2ZJYn7FHnepzr5iX9Kmz8FjIz4UKzJ9zhX3dnYuVW0xul9RuR3skBfoLu+FPTQw90EHW9rJsSZhyLQ3fQ== + dependencies: + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.0" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.8.0": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" + integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== + +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + +"@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== + +"@babel/helpers@^7.24.8": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" + integrity sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw== + dependencies: + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.0" + +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.24.8", "@babel/parser@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.0.tgz#9fdc9237504d797b6e7b8f66e78ea7f570d256ad" + integrity sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA== + +"@babel/plugin-syntax-async-generators@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-bigint@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.8.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" + integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + +"@babel/plugin-syntax-import-meta@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.7.2": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz#39a1fa4a7e3d3d7f34e2acc6be585b718d30e02d" + integrity sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" + integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-typescript@^7.7.2": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c" + integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.7" + +"@babel/template@^7.24.7", "@babel/template@^7.25.0", "@babel/template@^7.3.3": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" + integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.25.0" + "@babel/types" "^7.25.0" + +"@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0": + version "7.25.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.1.tgz#64dbc31effc5f3fa3cf10d19df0e6310214743f5" + integrity sha512-LrHHoWq08ZpmmFqBAzN+hUdWwy5zt7FGa/hVwMcOqW6OVtwqaoD5utfuGYU87JYxdZgLUvktAsn37j/sYR9siA== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/parser" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.0" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.24.9", "@babel/types@^7.25.0", "@babel/types@^7.3.3": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.0.tgz#e6e3656c581f28da8452ed4f69e38008ec0ba41b" + integrity sha512-LcnxQSsd9aXOIgmmSpvZ/1yo46ra2ESYyqLcryaBZOghxy5qqOBjvCWP5JfkI8yl9rlxRgdLTTMCQQRcN2hdCg== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== + dependencies: + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + ci-info "^3.2.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== + dependencies: + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== + dependencies: + expect "^29.7.0" + jest-snapshot "^29.7.0" + +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== + dependencies: + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" + "@types/node" "*" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" + +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + "@types/node" "*" + chalk "^4.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^6.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.1.3" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" + slash "^3.0.0" + string-length "^4.0.1" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== + dependencies: + "@jridgewell/trace-mapping" "^0.3.18" + callsites "^3.0.0" + graceful-fs "^4.2.9" + +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== + dependencies: + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== + dependencies: + "@jest/test-result" "^29.7.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + slash "^3.0.0" + +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== + dependencies: + "@babel/core" "^7.11.6" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" + babel-plugin-istanbul "^6.1.1" + chalk "^4.0.0" + convert-source-map "^2.0.0" + fast-json-stable-stringify "^2.1.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + micromatch "^4.0.4" + pirates "^4.0.4" + slash "^3.0.0" + write-file-atomic "^4.0.2" + +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== + dependencies: + "@jest/schemas" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + +"@sinonjs/commons@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" + integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== + dependencies: + "@sinonjs/commons" "^3.0.0" + +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + +"@types/babel__core@^7.1.14": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.8" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" + integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.6" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" + integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== + dependencies: + "@babel/types" "^7.20.7" + +"@types/graceful-fs@^4.1.3": + version "4.1.9" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" + integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== + dependencies: + "@types/node" "*" + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== + +"@types/istanbul-lib-report@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== + dependencies: + "@types/istanbul-lib-report" "*" + +"@types/jest@29.5.5": + version "29.5.5" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.5.tgz#727204e06228fe24373df9bae76b90f3e8236a2a" + integrity sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg== + dependencies: + expect "^29.0.0" + pretty-format "^29.0.0" + +"@types/jsdom@^20.0.0": + version "20.0.1" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808" + integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ== + dependencies: + "@types/node" "*" + "@types/tough-cookie" "*" + parse5 "^7.0.0" + +"@types/node-fetch@2.6.9": + version "2.6.9" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.9.tgz#15f529d247f1ede1824f7e7acdaa192d5f28071e" + integrity sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + +"@types/node@*": + version "22.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" + integrity sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw== + dependencies: + undici-types "~6.11.1" + +"@types/node@17.0.33": + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506" + integrity sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ== + +"@types/qs@6.9.8": + version "6.9.8" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.8.tgz#f2a7de3c107b89b441e071d5472e6b726b4adf45" + integrity sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg== + +"@types/stack-utils@^2.0.0": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" + integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== + +"@types/tough-cookie@*": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" + integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== + +"@types/url-join@4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/url-join/-/url-join-4.0.1.tgz#4989c97f969464647a8586c7252d97b449cdc045" + integrity sha512-wDXw9LEEUHyV+7UWy7U315nrJGJ7p1BzaCxDpEoLr789Dk1WDVMMlf3iBfbG2F8NdWnYyFbtTxUn2ZNbm1Q4LQ== + +"@types/yargs-parser@*": + version "21.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== + +"@types/yargs@^17.0.8": + version "17.0.32" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" + integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== + dependencies: + "@types/yargs-parser" "*" + +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +acorn-globals@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" + integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== + dependencies: + acorn "^8.1.0" + acorn-walk "^8.0.2" + +acorn-walk@^8.0.2: + version "8.3.3" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" + integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + dependencies: + acorn "^8.11.0" + +acorn@^8.1.0, acorn@^8.11.0, acorn@^8.8.1: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +anymatch@^3.0.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== + dependencies: + "@jest/transform" "^29.7.0" + "@types/babel__core" "^7.1.14" + babel-plugin-istanbul "^6.1.1" + babel-preset-jest "^29.6.3" + chalk "^4.0.0" + graceful-fs "^4.2.9" + slash "^3.0.0" + +babel-plugin-istanbul@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" + integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^5.0.4" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== + dependencies: + "@babel/template" "^7.3.3" + "@babel/types" "^7.3.3" + "@types/babel__core" "^7.1.14" + "@types/babel__traverse" "^7.0.6" + +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + dependencies: + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-bigint" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.8.3" + "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== + dependencies: + babel-plugin-jest-hoist "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browserslist@^4.23.1: + version "4.23.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.2.tgz#244fe803641f1c19c28c48c4b6ec9736eb3d32ed" + integrity sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA== + dependencies: + caniuse-lite "^1.0.30001640" + electron-to-chromium "^1.4.820" + node-releases "^2.0.14" + update-browserslist-db "^1.1.0" + +bs-logger@0.x: + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== + dependencies: + fast-json-stable-stringify "2.x" + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.2.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001640: + version "1.0.30001643" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz#9c004caef315de9452ab970c3da71085f8241dbd" + integrity sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +char-regex@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" + integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== + +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +cjs-module-lexer@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" + integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== + +collect-v8-coverage@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +cssom@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" + integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + +data-urls@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" + integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== + dependencies: + abab "^2.0.6" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" + +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + dependencies: + ms "2.1.2" + +decimal.js@^10.4.2: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + +dedent@^1.0.0: + version "1.5.3" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" + integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + +domexception@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" + integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== + dependencies: + webidl-conversions "^7.0.0" + +electron-to-chromium@^1.4.820: + version "1.5.2" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.2.tgz#6126ad229ce45e781ec54ca40db0504787f23d19" + integrity sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ== + +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +entities@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +escalade@^3.1.1, escalade@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escodegen@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== + +expect@^29.0.0, expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== + dependencies: + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + +fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fb-watchman@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== + dependencies: + bser "2.1.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +formdata-node@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-6.0.3.tgz#48f8e2206ae2befded82af621ef015f08168dc6d" + integrity sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@^2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +html-encoding-sniffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" + integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== + dependencies: + whatwg-encoding "^2.0.0" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + +https-proxy-agent@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +import-local@^3.0.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-core-module@^2.13.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.0.tgz#71c72ec5442ace7e76b306e9d48db361f22699ea" + integrity sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA== + dependencies: + hasown "^2.0.2" + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^6.3.0" + +istanbul-lib-instrument@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" + integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.1.3: + version "3.1.7" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== + dependencies: + execa "^5.0.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + co "^4.6.0" + dedent "^1.0.0" + is-generator-fn "^2.0.0" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== + dependencies: + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + chalk "^4.0.0" + create-jest "^29.7.0" + exit "^0.1.2" + import-local "^3.0.2" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" + +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== + dependencies: + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" + chalk "^4.0.0" + ci-info "^3.2.0" + deepmerge "^4.2.2" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + micromatch "^4.0.4" + parse-json "^5.2.0" + pretty-format "^29.7.0" + slash "^3.0.0" + strip-json-comments "^3.1.1" + +jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== + dependencies: + detect-newline "^3.0.0" + +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +jest-environment-jsdom@29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz#d206fa3551933c3fd519e5dfdb58a0f5139a837f" + integrity sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/jsdom" "^20.0.0" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + jsdom "^20.0.0" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-mock "^29.7.0" + jest-util "^29.7.0" + +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== + dependencies: + "@jest/types" "^29.6.3" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== + dependencies: + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== + dependencies: + chalk "^4.0.0" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^29.6.3" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^29.7.0" + slash "^3.0.0" + stack-utils "^2.0.3" + +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + jest-util "^29.7.0" + +jest-pnp-resolver@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" + +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== + dependencies: + chalk "^4.0.0" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-pnp-resolver "^1.2.2" + jest-util "^29.7.0" + jest-validate "^29.7.0" + resolve "^1.20.0" + resolve.exports "^2.0.0" + slash "^3.0.0" + +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== + dependencies: + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + emittery "^0.13.1" + graceful-fs "^4.2.9" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + cjs-module-lexer "^1.0.0" + collect-v8-coverage "^1.0.0" + glob "^7.1.3" + graceful-fs "^4.2.9" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + slash "^3.0.0" + strip-bom "^4.0.0" + +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== + dependencies: + "@babel/core" "^7.11.6" + "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" + "@babel/plugin-syntax-typescript" "^7.7.2" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + babel-preset-current-node-syntax "^1.0.0" + chalk "^4.0.0" + expect "^29.7.0" + graceful-fs "^4.2.9" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + natural-compare "^1.4.0" + pretty-format "^29.7.0" + semver "^7.5.3" + +jest-util@^29.0.0, jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== + dependencies: + "@jest/types" "^29.6.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^29.6.3" + leven "^3.1.0" + pretty-format "^29.7.0" + +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== + dependencies: + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.13.1" + jest-util "^29.7.0" + string-length "^4.0.1" + +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== + dependencies: + "@types/node" "*" + jest-util "^29.7.0" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +jest@29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== + dependencies: + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" + import-local "^3.0.2" + jest-cli "^29.7.0" + +js-base64@3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745" + integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsdom@^20.0.0: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" + integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== + dependencies: + abab "^2.0.6" + acorn "^8.8.1" + acorn-globals "^7.0.0" + cssom "^0.5.0" + cssstyle "^2.3.0" + data-urls "^3.0.2" + decimal.js "^10.4.2" + domexception "^4.0.0" + escodegen "^2.0.0" + form-data "^4.0.0" + html-encoding-sniffer "^3.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.1" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.2" + parse5 "^7.1.1" + saxes "^6.0.0" + symbol-tree "^3.2.4" + tough-cookie "^4.1.2" + w3c-xmlserializer "^4.0.0" + webidl-conversions "^7.0.0" + whatwg-encoding "^2.0.0" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" + ws "^8.11.0" + xml-name-validator "^4.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.memoize@4.x: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +make-error@1.x: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +makeerror@1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" + integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== + dependencies: + tmpl "1.0.5" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^4.0.4: + version "4.0.7" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" + integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +node-fetch@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== + +node-releases@^2.0.14: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +nwsapi@^2.2.2: + version "2.2.12" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.12.tgz#fb6af5c0ec35b27b4581eb3bbad34ec9e5c696f8" + integrity sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w== + +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parse5@^7.0.0, parse5@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +picocolors@^1.0.0, picocolors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" + integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== + +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pirates@^4.0.4: + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +prettier@2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== + +pretty-format@^29.0.0, pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +prompts@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + +psl@^1.1.33: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + +punycode@^2.1.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +pure-rand@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.1.0.tgz#d173cf23258231976ccbdb05247c9787957604f2" + integrity sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA== + +qs@6.11.2: + version "6.11.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" + integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== + dependencies: + side-channel "^1.0.4" + +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + +react-is@^18.0.0: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== + +resolve@^1.20.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +saxes@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" + integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== + dependencies: + xmlchars "^2.2.0" + +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.5.3, semver@^7.5.4: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +signal-exit@^3.0.3, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stack-utils@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== + dependencies: + escape-string-regexp "^2.0.0" + +string-length@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" + integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== + dependencies: + char-regex "^1.0.2" + strip-ansi "^6.0.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +tmpl@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" + integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tough-cookie@^4.1.2: + version "4.1.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.4.tgz#945f1461b45b5a8c76821c33ea49c3ac192c1b36" + integrity sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== + dependencies: + punycode "^2.1.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-jest@29.1.1: + version "29.1.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" + integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== + dependencies: + bs-logger "0.x" + fast-json-stable-stringify "2.x" + jest-util "^29.0.0" + json5 "^2.2.3" + lodash.memoize "4.x" + make-error "1.x" + semver "^7.5.3" + yargs-parser "^21.0.1" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +typescript@4.6.4: + version "4.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" + integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== + +undici-types@~6.11.1: + version "6.11.1" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.11.1.tgz#432ea6e8efd54a48569705a699e62d8f4981b197" + integrity sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ== + +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + +url-join@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" + integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== + +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +v8-to-istanbul@^9.0.1: + version "9.3.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" + integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + +w3c-xmlserializer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" + integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== + dependencies: + xml-name-validator "^4.0.0" + +walker@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" + integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== + dependencies: + makeerror "1.0.12" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== + +whatwg-encoding@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" + integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== + dependencies: + iconv-lite "0.6.3" + +whatwg-mimetype@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" + integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== + +whatwg-url@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" + integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== + dependencies: + tr46 "^3.0.0" + webidl-conversions "^7.0.0" + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write-file-atomic@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" + integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^3.0.7" + +ws@^8.11.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@^21.0.1, yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==