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