diff --git a/package.json b/package.json index 8910092..58d8440 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gooeyai", - "version": "0.0.1-beta11", + "version": "0.0.1-beta12", "private": false, "repository": "https://github.com/GooeyAI/typescript-sdk", "main": "./index.js", diff --git a/reference.md b/reference.md index 6800590..c34f50b 100644 --- a/reference.md +++ b/reference.md @@ -192,9 +192,9 @@ await client.copilotForYourEnterprise.asyncVideoBots(); -## AiArtQrCode +## Evaluator -
client.aiArtQrCode.asyncArtQrCode({ ...params }) -> Gooey.QrCodeGeneratorPageResponse +
client.evaluator.asyncBulkEval({ ...params }) -> Gooey.BulkEvalPageResponse
@@ -207,8 +207,8 @@ await client.copilotForYourEnterprise.asyncVideoBots();
```typescript -await client.aiArtQrCode.asyncArtQrCode({ - textPrompt: "text_prompt", +await client.evaluator.asyncBulkEval({ + documents: ["documents"], }); ``` @@ -225,7 +225,7 @@ await client.aiArtQrCode.asyncArtQrCode({
-**request:** `Gooey.QrCodeGeneratorPageRequest` +**request:** `Gooey.BulkEvalPageRequest`
@@ -233,7 +233,7 @@ await client.aiArtQrCode.asyncArtQrCode({
-**requestOptions:** `AiArtQrCode.RequestOptions` +**requestOptions:** `Evaluator.RequestOptions`
@@ -244,9 +244,9 @@ await client.aiArtQrCode.asyncArtQrCode({
-## Evaluator +## SmartGpt -
client.evaluator.asyncBulkEval({ ...params }) -> Gooey.BulkEvalPageResponse +
client.smartGpt.asyncSmartGpt({ ...params }) -> Gooey.SmartGptPageResponse
@@ -259,8 +259,8 @@ await client.aiArtQrCode.asyncArtQrCode({
```typescript -await client.evaluator.asyncBulkEval({ - documents: ["documents"], +await client.smartGpt.asyncSmartGpt({ + inputPrompt: "input_prompt", }); ``` @@ -277,7 +277,7 @@ await client.evaluator.asyncBulkEval({
-**request:** `Gooey.BulkEvalPageRequest` +**request:** `Gooey.SmartGptPageRequest`
@@ -285,7 +285,7 @@ await client.evaluator.asyncBulkEval({
-**requestOptions:** `Evaluator.RequestOptions` +**requestOptions:** `SmartGpt.RequestOptions`
@@ -296,9 +296,7 @@ await client.evaluator.asyncBulkEval({
-## SmartGpt - -
client.smartGpt.asyncSmartGpt({ ...params }) -> Gooey.SmartGptPageResponse +
client.smartGpt.post() -> void
@@ -311,9 +309,7 @@ await client.evaluator.asyncBulkEval({
```typescript -await client.smartGpt.asyncSmartGpt({ - inputPrompt: "input_prompt", -}); +await client.smartGpt.post(); ```
@@ -329,14 +325,6 @@ await client.smartGpt.asyncSmartGpt({
-**request:** `Gooey.SmartGptPageRequest` - -
-
- -
-
- **requestOptions:** `SmartGpt.RequestOptions`
@@ -348,7 +336,9 @@ await client.smartGpt.asyncSmartGpt({
-
client.smartGpt.post() -> void +## Functions + +
client.functions.asyncFunctions({ ...params }) -> Gooey.FunctionsPageResponse
@@ -361,7 +351,7 @@ await client.smartGpt.asyncSmartGpt({
```typescript -await client.smartGpt.post(); +await client.functions.asyncFunctions(); ```
@@ -377,7 +367,15 @@ await client.smartGpt.post();
-**requestOptions:** `SmartGpt.RequestOptions` +**request:** `Gooey.FunctionsPageRequest` + +
+
+ +
+
+ +**requestOptions:** `Functions.RequestOptions`
@@ -388,9 +386,7 @@ await client.smartGpt.post();
-## SummarizeYourDocsWithGpt - -
client.summarizeYourDocsWithGpt.asyncDocSummary({ ...params }) -> Gooey.DocSummaryPageResponse +
client.functions.post() -> void
@@ -403,9 +399,7 @@ await client.smartGpt.post();
```typescript -await client.summarizeYourDocsWithGpt.asyncDocSummary({ - documents: ["documents"], -}); +await client.functions.post(); ```
@@ -421,15 +415,7 @@ await client.summarizeYourDocsWithGpt.asyncDocSummary({
-**request:** `Gooey.DocSummaryPageRequest` - -
-
- -
-
- -**requestOptions:** `SummarizeYourDocsWithGpt.RequestOptions` +**requestOptions:** `Functions.RequestOptions`
@@ -665,45 +651,3 @@ await client.embeddings.post();
- -## Functions - -
client.functions.post() -> void -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.functions.post(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**requestOptions:** `Functions.RequestOptions` - -
-
-
-
- -
-
-
diff --git a/src/Client.ts b/src/Client.ts index baf6f25..deb8943 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -10,15 +10,13 @@ import urlJoin from "url-join"; import * as errors from "./errors/index"; import { CopilotIntegrations } from "./api/resources/copilotIntegrations/client/Client"; import { CopilotForYourEnterprise } from "./api/resources/copilotForYourEnterprise/client/Client"; -import { AiArtQrCode } from "./api/resources/aiArtQrCode/client/Client"; import { Evaluator } from "./api/resources/evaluator/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 { Misc } from "./api/resources/misc/client/Client"; import { BulkRunner } from "./api/resources/bulkRunner/client/Client"; import { Embeddings } from "./api/resources/embeddings/client/Client"; -import { Functions } from "./api/resources/functions/client/Client"; export declare namespace GooeyClient { interface Options { @@ -76,7 +74,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -145,6 +143,108 @@ export class GooeyClient { } } + /** + * @param {Gooey.QrCodeGeneratorPageRequest} request + * @param {GooeyClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.qrCode({ + * textPrompt: "text_prompt" + * }) + */ + public async qrCode( + request: Gooey.QrCodeGeneratorPageRequest, + requestOptions?: GooeyClient.RequestOptions + ): Promise { + const { exampleId, ..._body } = request; + const _queryParams: Record = {}; + if (exampleId != null) { + _queryParams["example_id"] = exampleId; + } + + 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": "gooeyai", + "X-Fern-SDK-Version": "0.0.1-beta12", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.QrCodeGeneratorPageRequest.jsonOrThrow(_body, { 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"], + }) + ); + 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 {GooeyClient.RequestOptions} requestOptions - Request-specific configuration. @@ -179,7 +279,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -284,7 +384,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -387,7 +487,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -489,7 +589,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -598,7 +698,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -700,7 +800,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -800,7 +900,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -902,7 +1002,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -971,6 +1071,108 @@ export class GooeyClient { } } + /** + * @param {Gooey.DocSummaryPageRequest} request + * @param {GooeyClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.docSummary({ + * documents: ["documents"] + * }) + */ + public async docSummary( + request: Gooey.DocSummaryPageRequest, + requestOptions?: GooeyClient.RequestOptions + ): Promise { + const { exampleId, ..._body } = request; + const _queryParams: Record = {}; + if (exampleId != null) { + _queryParams["example_id"] = exampleId; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, + "v3/doc-summary/async" + ), + method: "POST", + headers: { + Authorization: await this._getAuthorizationHeader(), + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "gooeyai", + "X-Fern-SDK-Version": "0.0.1-beta12", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.DocSummaryPageRequest.jsonOrThrow(_body, { 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"], + }) + ); + 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 {GooeyClient.RequestOptions} requestOptions - Request-specific configuration. @@ -1004,7 +1206,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1106,7 +1308,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1208,7 +1410,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1310,7 +1512,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1410,7 +1612,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1512,7 +1714,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1614,7 +1816,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1717,7 +1919,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1820,7 +2022,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -1923,7 +2125,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -2026,7 +2228,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -2128,7 +2330,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -2230,7 +2432,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -2299,6 +2501,108 @@ export class GooeyClient { } } + /** + * @param {Gooey.EmbeddingsPageRequest} request + * @param {GooeyClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Gooey.PaymentRequiredError} + * @throws {@link Gooey.UnprocessableEntityError} + * @throws {@link Gooey.TooManyRequestsError} + * + * @example + * await client.embed({ + * texts: ["texts"] + * }) + */ + public async embed( + request: Gooey.EmbeddingsPageRequest, + requestOptions?: GooeyClient.RequestOptions + ): Promise { + const { exampleId, ..._body } = request; + const _queryParams: Record = {}; + if (exampleId != null) { + _queryParams["example_id"] = exampleId; + } + + 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": "gooeyai", + "X-Fern-SDK-Version": "0.0.1-beta12", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.EmbeddingsPageRequest.jsonOrThrow(_body, { 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"], + }) + ); + 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 {GooeyClient.RequestOptions} requestOptions - Request-specific configuration. @@ -2332,7 +2636,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -2418,7 +2722,7 @@ export class GooeyClient { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -2466,12 +2770,6 @@ export class GooeyClient { return (this._copilotForYourEnterprise ??= new CopilotForYourEnterprise(this._options)); } - protected _aiArtQrCode: AiArtQrCode | undefined; - - public get aiArtQrCode(): AiArtQrCode { - return (this._aiArtQrCode ??= new AiArtQrCode(this._options)); - } - protected _evaluator: Evaluator | undefined; public get evaluator(): Evaluator { @@ -2484,10 +2782,10 @@ export class GooeyClient { return (this._smartGpt ??= new SmartGpt(this._options)); } - protected _summarizeYourDocsWithGpt: SummarizeYourDocsWithGpt | undefined; + protected _functions: Functions | undefined; - public get summarizeYourDocsWithGpt(): SummarizeYourDocsWithGpt { - return (this._summarizeYourDocsWithGpt ??= new SummarizeYourDocsWithGpt(this._options)); + public get functions(): Functions { + return (this._functions ??= new Functions(this._options)); } protected _lipSyncing: LipSyncing | undefined; @@ -2514,12 +2812,6 @@ export class GooeyClient { return (this._embeddings ??= new Embeddings(this._options)); } - protected _functions: Functions | undefined; - - public get functions(): Functions { - return (this._functions ??= new Functions(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"]; if (bearer == null) { diff --git a/src/api/resources/summarizeYourDocsWithGpt/client/requests/DocSummaryPageRequest.ts b/src/api/client/requests/DocSummaryPageRequest.ts similarity index 95% rename from src/api/resources/summarizeYourDocsWithGpt/client/requests/DocSummaryPageRequest.ts rename to src/api/client/requests/DocSummaryPageRequest.ts index 7512e14..c57a2f4 100644 --- a/src/api/resources/summarizeYourDocsWithGpt/client/requests/DocSummaryPageRequest.ts +++ b/src/api/client/requests/DocSummaryPageRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Gooey from "../../../../index"; +import * as Gooey from "../../index"; /** * @example diff --git a/src/api/types/EmbeddingsPageRequest.ts b/src/api/client/requests/EmbeddingsPageRequest.ts similarity index 75% rename from src/api/types/EmbeddingsPageRequest.ts rename to src/api/client/requests/EmbeddingsPageRequest.ts index 4614380..4f6f01a 100644 --- a/src/api/types/EmbeddingsPageRequest.ts +++ b/src/api/client/requests/EmbeddingsPageRequest.ts @@ -2,9 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Gooey from "../index"; +import * as Gooey from "../../index"; +/** + * @example + * { + * texts: ["texts"] + * } + */ export interface EmbeddingsPageRequest { + exampleId?: string; functions?: Gooey.RecipeFunction[]; /** Variables to be used as Jinja prompt templates and in functions as arguments */ variables?: Record; diff --git a/src/api/resources/aiArtQrCode/client/requests/QrCodeGeneratorPageRequest.ts b/src/api/client/requests/QrCodeGeneratorPageRequest.ts similarity index 96% rename from src/api/resources/aiArtQrCode/client/requests/QrCodeGeneratorPageRequest.ts rename to src/api/client/requests/QrCodeGeneratorPageRequest.ts index 067b097..b53ba1c 100644 --- a/src/api/resources/aiArtQrCode/client/requests/QrCodeGeneratorPageRequest.ts +++ b/src/api/client/requests/QrCodeGeneratorPageRequest.ts @@ -2,7 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Gooey from "../../../../index"; +import * as Gooey from "../../index"; /** * @example diff --git a/src/api/client/requests/index.ts b/src/api/client/requests/index.ts index 05b0e27..03749f9 100644 --- a/src/api/client/requests/index.ts +++ b/src/api/client/requests/index.ts @@ -1,4 +1,5 @@ export { type DeforumSdPageRequest } from "./DeforumSdPageRequest"; +export { type QrCodeGeneratorPageRequest } from "./QrCodeGeneratorPageRequest"; export { type RelatedQnAPageRequest } from "./RelatedQnAPageRequest"; export { type SeoSummaryPageRequest } from "./SeoSummaryPageRequest"; export { type GoogleGptPageRequest } from "./GoogleGptPageRequest"; @@ -7,6 +8,7 @@ export { type BulkRunnerPageRequest } from "./BulkRunnerPageRequest"; export { type DocExtractPageRequest } from "./DocExtractPageRequest"; export { type CompareLlmPageRequest } from "./CompareLlmPageRequest"; export { type DocSearchPageRequest } from "./DocSearchPageRequest"; +export { type DocSummaryPageRequest } from "./DocSummaryPageRequest"; export { type LipsyncTtsPageRequest } from "./LipsyncTtsPageRequest"; export { type TextToSpeechPageRequest } from "./TextToSpeechPageRequest"; export { type AsrPageRequest } from "./AsrPageRequest"; @@ -20,4 +22,5 @@ export { type EmailFaceInpaintingPageRequest } from "./EmailFaceInpaintingPageRe export { type GoogleImageGenPageRequest } from "./GoogleImageGenPageRequest"; export { type ImageSegmentationPageRequest } from "./ImageSegmentationPageRequest"; export { type CompareUpscalerPageRequest } from "./CompareUpscalerPageRequest"; +export { type EmbeddingsPageRequest } from "./EmbeddingsPageRequest"; export { type RelatedQnADocPageRequest } from "./RelatedQnADocPageRequest"; diff --git a/src/api/resources/aiArtQrCode/client/Client.ts b/src/api/resources/aiArtQrCode/client/Client.ts deleted file mode 100644 index 44b674f..0000000 --- a/src/api/resources/aiArtQrCode/client/Client.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * 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; - 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; - } -} - -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} - * - * @example - * await client.aiArtQrCode.asyncArtQrCode({ - * textPrompt: "text_prompt" - * }) - */ - public async asyncArtQrCode( - request: Gooey.QrCodeGeneratorPageRequest, - requestOptions?: AiArtQrCode.RequestOptions - ): Promise { - const { exampleId, ..._body } = request; - const _queryParams: Record = {}; - if (exampleId != null) { - _queryParams["example_id"] = exampleId; - } - - 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": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - body: serializers.QrCodeGeneratorPageRequest.jsonOrThrow(_body, { 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"], - }) - ); - 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}`; - } -} diff --git a/src/api/resources/aiArtQrCode/client/requests/index.ts b/src/api/resources/aiArtQrCode/client/requests/index.ts deleted file mode 100644 index a9af73e..0000000 --- a/src/api/resources/aiArtQrCode/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type QrCodeGeneratorPageRequest } from "./QrCodeGeneratorPageRequest"; diff --git a/src/api/resources/aiArtQrCode/index.ts b/src/api/resources/aiArtQrCode/index.ts deleted file mode 100644 index c9240f8..0000000 --- a/src/api/resources/aiArtQrCode/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./client"; diff --git a/src/api/resources/aiArtQrCode/types/index.ts b/src/api/resources/aiArtQrCode/types/index.ts deleted file mode 100644 index 691d1d7..0000000 --- a/src/api/resources/aiArtQrCode/types/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./QrCodeGeneratorPageRequestImagePromptControlnetModelsItem"; -export * from "./QrCodeGeneratorPageRequestSelectedModel"; -export * from "./QrCodeGeneratorPageRequestSelectedControlnetModelItem"; -export * from "./QrCodeGeneratorPageRequestScheduler"; diff --git a/src/api/resources/bulkRunner/client/Client.ts b/src/api/resources/bulkRunner/client/Client.ts index 103786d..4d467b5 100644 --- a/src/api/resources/bulkRunner/client/Client.ts +++ b/src/api/resources/bulkRunner/client/Client.ts @@ -44,7 +44,7 @@ export class BulkRunner { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/copilotForYourEnterprise/client/Client.ts b/src/api/resources/copilotForYourEnterprise/client/Client.ts index 8df49bd..c1e1006 100644 --- a/src/api/resources/copilotForYourEnterprise/client/Client.ts +++ b/src/api/resources/copilotForYourEnterprise/client/Client.ts @@ -60,7 +60,7 @@ export class CopilotForYourEnterprise { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/copilotIntegrations/client/Client.ts b/src/api/resources/copilotIntegrations/client/Client.ts index 3d2daa8..71f714a 100644 --- a/src/api/resources/copilotIntegrations/client/Client.ts +++ b/src/api/resources/copilotIntegrations/client/Client.ts @@ -55,7 +55,7 @@ export class CopilotIntegrations { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -137,7 +137,7 @@ export class CopilotIntegrations { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/embeddings/client/Client.ts b/src/api/resources/embeddings/client/Client.ts index d8c8c9b..df4085b 100644 --- a/src/api/resources/embeddings/client/Client.ts +++ b/src/api/resources/embeddings/client/Client.ts @@ -44,7 +44,7 @@ export class Embeddings { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/evaluator/client/Client.ts b/src/api/resources/evaluator/client/Client.ts index 4a18f8a..b8ac08a 100644 --- a/src/api/resources/evaluator/client/Client.ts +++ b/src/api/resources/evaluator/client/Client.ts @@ -62,7 +62,7 @@ export class Evaluator { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/functions/client/Client.ts b/src/api/resources/functions/client/Client.ts index e4175d1..46021b3 100644 --- a/src/api/resources/functions/client/Client.ts +++ b/src/api/resources/functions/client/Client.ts @@ -4,6 +4,8 @@ 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"; @@ -27,6 +29,106 @@ export declare namespace Functions { 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} + * + * @example + * await client.functions.asyncFunctions() + */ + public async asyncFunctions( + request: Gooey.FunctionsPageRequest = {}, + requestOptions?: Functions.RequestOptions + ): Promise { + const { exampleId, ..._body } = request; + const _queryParams: Record = {}; + if (exampleId != null) { + _queryParams["example_id"] = exampleId; + } + + 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": "gooeyai", + "X-Fern-SDK-Version": "0.0.1-beta12", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.FunctionsPageRequest.jsonOrThrow(_body, { 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"], + }) + ); + 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 {Functions.RequestOptions} requestOptions - Request-specific configuration. * @@ -44,7 +146,7 @@ export class Functions { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/functions/client/index.ts b/src/api/resources/functions/client/index.ts index cb0ff5c..415726b 100644 --- a/src/api/resources/functions/client/index.ts +++ b/src/api/resources/functions/client/index.ts @@ -1 +1 @@ -export {}; +export * from "./requests"; diff --git a/src/api/types/FunctionsPageRequest.ts b/src/api/resources/functions/client/requests/FunctionsPageRequest.ts similarity index 75% rename from src/api/types/FunctionsPageRequest.ts rename to src/api/resources/functions/client/requests/FunctionsPageRequest.ts index 5fa2515..c3f1b11 100644 --- a/src/api/types/FunctionsPageRequest.ts +++ b/src/api/resources/functions/client/requests/FunctionsPageRequest.ts @@ -2,9 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Gooey from "../index"; +import * as Gooey from "../../../../index"; +/** + * @example + * {} + */ export interface FunctionsPageRequest { + exampleId?: string; /** The JS code to be executed. */ code?: string; /** Variables to be used in the code */ 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..7678e3d --- /dev/null +++ b/src/api/resources/functions/client/requests/index.ts @@ -0,0 +1 @@ +export { type FunctionsPageRequest } from "./FunctionsPageRequest"; diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 419c0c2..2c2eef9 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -2,25 +2,20 @@ export * as copilotIntegrations from "./copilotIntegrations"; export * from "./copilotIntegrations/types"; export * as copilotForYourEnterprise from "./copilotForYourEnterprise"; export * from "./copilotForYourEnterprise/types"; -export * as aiArtQrCode from "./aiArtQrCode"; -export * from "./aiArtQrCode/types"; export * as evaluator from "./evaluator"; export * from "./evaluator/types"; export * as smartGpt from "./smartGpt"; export * from "./smartGpt/types"; -export * as summarizeYourDocsWithGpt from "./summarizeYourDocsWithGpt"; -export * from "./summarizeYourDocsWithGpt/types"; export * as lipSyncing from "./lipSyncing"; export * from "./lipSyncing/types"; +export * as functions from "./functions"; export * as misc from "./misc"; export * as bulkRunner from "./bulkRunner"; export * as embeddings from "./embeddings"; -export * as functions from "./functions"; export * from "./copilotIntegrations/client/requests"; export * from "./copilotForYourEnterprise/client/requests"; -export * from "./aiArtQrCode/client/requests"; export * from "./evaluator/client/requests"; export * from "./smartGpt/client/requests"; -export * from "./summarizeYourDocsWithGpt/client/requests"; +export * from "./functions/client/requests"; export * from "./lipSyncing/client/requests"; export * from "./misc/client/requests"; diff --git a/src/api/resources/lipSyncing/client/Client.ts b/src/api/resources/lipSyncing/client/Client.ts index 6c47a98..8ac0006 100644 --- a/src/api/resources/lipSyncing/client/Client.ts +++ b/src/api/resources/lipSyncing/client/Client.ts @@ -60,7 +60,7 @@ export class LipSyncing { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/misc/client/Client.ts b/src/api/resources/misc/client/Client.ts index 4a8f1f2..5343600 100644 --- a/src/api/resources/misc/client/Client.ts +++ b/src/api/resources/misc/client/Client.ts @@ -46,7 +46,7 @@ export class Misc { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -123,7 +123,7 @@ export class Misc { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/smartGpt/client/Client.ts b/src/api/resources/smartGpt/client/Client.ts index 02f172a..8a8afb7 100644 --- a/src/api/resources/smartGpt/client/Client.ts +++ b/src/api/resources/smartGpt/client/Client.ts @@ -62,7 +62,7 @@ export class SmartGpt { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -148,7 +148,7 @@ export class SmartGpt { Authorization: await this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", + "X-Fern-SDK-Version": "0.0.1-beta12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, diff --git a/src/api/resources/summarizeYourDocsWithGpt/client/Client.ts b/src/api/resources/summarizeYourDocsWithGpt/client/Client.ts deleted file mode 100644 index 8c01296..0000000 --- a/src/api/resources/summarizeYourDocsWithGpt/client/Client.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * 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; - 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; - } -} - -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} - * - * @example - * await client.summarizeYourDocsWithGpt.asyncDocSummary({ - * documents: ["documents"] - * }) - */ - public async asyncDocSummary( - request: Gooey.DocSummaryPageRequest, - requestOptions?: SummarizeYourDocsWithGpt.RequestOptions - ): Promise { - const { exampleId, ..._body } = request; - const _queryParams: Record = {}; - if (exampleId != null) { - _queryParams["example_id"] = exampleId; - } - - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: urlJoin( - (await core.Supplier.get(this._options.environment)) ?? environments.GooeyEnvironment.Default, - "v3/doc-summary/async" - ), - method: "POST", - headers: { - Authorization: await this._getAuthorizationHeader(), - "X-Fern-Language": "JavaScript", - "X-Fern-SDK-Name": "gooeyai", - "X-Fern-SDK-Version": "0.0.1-beta11", - "X-Fern-Runtime": core.RUNTIME.type, - "X-Fern-Runtime-Version": core.RUNTIME.version, - }, - contentType: "application/json", - queryParameters: _queryParams, - requestType: "json", - body: serializers.DocSummaryPageRequest.jsonOrThrow(_body, { 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"], - }) - ); - 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}`; - } -} diff --git a/src/api/resources/summarizeYourDocsWithGpt/client/index.ts b/src/api/resources/summarizeYourDocsWithGpt/client/index.ts deleted file mode 100644 index 415726b..0000000 --- a/src/api/resources/summarizeYourDocsWithGpt/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/api/resources/summarizeYourDocsWithGpt/client/requests/index.ts b/src/api/resources/summarizeYourDocsWithGpt/client/requests/index.ts deleted file mode 100644 index 6723561..0000000 --- a/src/api/resources/summarizeYourDocsWithGpt/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type DocSummaryPageRequest } from "./DocSummaryPageRequest"; diff --git a/src/api/resources/summarizeYourDocsWithGpt/types/index.ts b/src/api/resources/summarizeYourDocsWithGpt/types/index.ts deleted file mode 100644 index 15f811d..0000000 --- a/src/api/resources/summarizeYourDocsWithGpt/types/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./DocSummaryPageRequestSelectedModel"; -export * from "./DocSummaryPageRequestSelectedAsrModel"; -export * from "./DocSummaryPageRequestResponseFormatType"; diff --git a/src/api/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestResponseFormatType.ts b/src/api/types/DocSummaryPageRequestResponseFormatType.ts similarity index 100% rename from src/api/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestResponseFormatType.ts rename to src/api/types/DocSummaryPageRequestResponseFormatType.ts diff --git a/src/api/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedAsrModel.ts b/src/api/types/DocSummaryPageRequestSelectedAsrModel.ts similarity index 100% rename from src/api/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedAsrModel.ts rename to src/api/types/DocSummaryPageRequestSelectedAsrModel.ts diff --git a/src/api/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedModel.ts b/src/api/types/DocSummaryPageRequestSelectedModel.ts similarity index 100% rename from src/api/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedModel.ts rename to src/api/types/DocSummaryPageRequestSelectedModel.ts diff --git a/src/api/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts b/src/api/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts similarity index 100% rename from src/api/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts rename to src/api/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts diff --git a/src/api/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestScheduler.ts b/src/api/types/QrCodeGeneratorPageRequestScheduler.ts similarity index 100% rename from src/api/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestScheduler.ts rename to src/api/types/QrCodeGeneratorPageRequestScheduler.ts diff --git a/src/api/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts b/src/api/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts similarity index 100% rename from src/api/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts rename to src/api/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts diff --git a/src/api/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedModel.ts b/src/api/types/QrCodeGeneratorPageRequestSelectedModel.ts similarity index 100% rename from src/api/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedModel.ts rename to src/api/types/QrCodeGeneratorPageRequestSelectedModel.ts diff --git a/src/api/types/index.ts b/src/api/types/index.ts index d814cfd..7edf2f7 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,4 +1,8 @@ export * from "./DeforumSdPageRequestSelectedModel"; +export * from "./QrCodeGeneratorPageRequestImagePromptControlnetModelsItem"; +export * from "./QrCodeGeneratorPageRequestSelectedModel"; +export * from "./QrCodeGeneratorPageRequestSelectedControlnetModelItem"; +export * from "./QrCodeGeneratorPageRequestScheduler"; export * from "./RelatedQnAPageRequestSelectedModel"; export * from "./RelatedQnAPageRequestEmbeddingModel"; export * from "./RelatedQnAPageRequestResponseFormatType"; @@ -19,6 +23,9 @@ export * from "./DocSearchPageRequestEmbeddingModel"; export * from "./DocSearchPageRequestSelectedModel"; export * from "./DocSearchPageRequestCitationStyle"; export * from "./DocSearchPageRequestResponseFormatType"; +export * from "./DocSummaryPageRequestSelectedModel"; +export * from "./DocSummaryPageRequestSelectedAsrModel"; +export * from "./DocSummaryPageRequestResponseFormatType"; export * from "./LipsyncTtsPageRequestTtsProvider"; export * from "./LipsyncTtsPageRequestOpenaiVoiceName"; export * from "./LipsyncTtsPageRequestOpenaiTtsModel"; @@ -41,6 +48,7 @@ export * from "./EmailFaceInpaintingPageRequestSelectedModel"; export * from "./GoogleImageGenPageRequestSelectedModel"; export * from "./ImageSegmentationPageRequestSelectedModel"; export * from "./CompareUpscalerPageRequestSelectedModelsItem"; +export * from "./EmbeddingsPageRequestSelectedModel"; export * from "./RelatedQnADocPageRequestKeywordQuery"; export * from "./RelatedQnADocPageRequestEmbeddingModel"; export * from "./RelatedQnADocPageRequestSelectedModel"; @@ -107,8 +115,6 @@ export * from "./EmailFaceInpaintingPageOutput"; export * from "./EmailFaceInpaintingPageResponse"; export * from "./EmailFaceInpaintingPageStatusResponse"; export * from "./EmbeddingsPageOutput"; -export * from "./EmbeddingsPageRequestSelectedModel"; -export * from "./EmbeddingsPageRequest"; export * from "./EmbeddingsPageResponse"; export * from "./EmbeddingsPageStatusResponse"; export * from "./EvalPrompt"; @@ -119,7 +125,6 @@ export * from "./FailedReponseModelV2"; export * from "./FailedResponseDetail"; export * from "./FinalResponse"; export * from "./FunctionsPageOutput"; -export * from "./FunctionsPageRequest"; export * from "./FunctionsPageResponse"; export * from "./FunctionsPageStatusResponse"; export * from "./GenericErrorResponse"; diff --git a/src/serialization/resources/summarizeYourDocsWithGpt/client/requests/DocSummaryPageRequest.ts b/src/serialization/client/requests/DocSummaryPageRequest.ts similarity index 91% rename from src/serialization/resources/summarizeYourDocsWithGpt/client/requests/DocSummaryPageRequest.ts rename to src/serialization/client/requests/DocSummaryPageRequest.ts index 36b2863..967080e 100644 --- a/src/serialization/resources/summarizeYourDocsWithGpt/client/requests/DocSummaryPageRequest.ts +++ b/src/serialization/client/requests/DocSummaryPageRequest.ts @@ -2,14 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../index"; -import * as Gooey from "../../../../../api/index"; -import * as core from "../../../../../core"; -import { RecipeFunction } from "../../../../types/RecipeFunction"; +import * as serializers from "../../index"; +import * as Gooey from "../../../api/index"; +import * as core from "../../../core"; +import { RecipeFunction } from "../../types/RecipeFunction"; import { DocSummaryPageRequestSelectedModel } from "../../types/DocSummaryPageRequestSelectedModel"; import { DocSummaryPageRequestSelectedAsrModel } from "../../types/DocSummaryPageRequestSelectedAsrModel"; import { DocSummaryPageRequestResponseFormatType } from "../../types/DocSummaryPageRequestResponseFormatType"; -import { RunSettings } from "../../../../types/RunSettings"; +import { RunSettings } from "../../types/RunSettings"; export const DocSummaryPageRequest: core.serialization.Schema< serializers.DocSummaryPageRequest.Raw, diff --git a/src/serialization/types/EmbeddingsPageRequest.ts b/src/serialization/client/requests/EmbeddingsPageRequest.ts similarity index 65% rename from src/serialization/types/EmbeddingsPageRequest.ts rename to src/serialization/client/requests/EmbeddingsPageRequest.ts index 042dba9..8cfb559 100644 --- a/src/serialization/types/EmbeddingsPageRequest.ts +++ b/src/serialization/client/requests/EmbeddingsPageRequest.ts @@ -2,16 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../index"; -import * as Gooey from "../../api/index"; -import * as core from "../../core"; -import { RecipeFunction } from "./RecipeFunction"; -import { EmbeddingsPageRequestSelectedModel } from "./EmbeddingsPageRequestSelectedModel"; -import { RunSettings } from "./RunSettings"; +import * as serializers from "../../index"; +import * as Gooey from "../../../api/index"; +import * as core from "../../../core"; +import { RecipeFunction } from "../../types/RecipeFunction"; +import { EmbeddingsPageRequestSelectedModel } from "../../types/EmbeddingsPageRequestSelectedModel"; +import { RunSettings } from "../../types/RunSettings"; -export const EmbeddingsPageRequest: core.serialization.ObjectSchema< +export const EmbeddingsPageRequest: core.serialization.Schema< serializers.EmbeddingsPageRequest.Raw, - Gooey.EmbeddingsPageRequest + Omit > = core.serialization.object({ functions: core.serialization.list(RecipeFunction).optional(), variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), diff --git a/src/serialization/resources/aiArtQrCode/client/requests/QrCodeGeneratorPageRequest.ts b/src/serialization/client/requests/QrCodeGeneratorPageRequest.ts similarity index 94% rename from src/serialization/resources/aiArtQrCode/client/requests/QrCodeGeneratorPageRequest.ts rename to src/serialization/client/requests/QrCodeGeneratorPageRequest.ts index a85b7a7..293cffc 100644 --- a/src/serialization/resources/aiArtQrCode/client/requests/QrCodeGeneratorPageRequest.ts +++ b/src/serialization/client/requests/QrCodeGeneratorPageRequest.ts @@ -2,16 +2,16 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../../index"; -import * as Gooey from "../../../../../api/index"; -import * as core from "../../../../../core"; -import { RecipeFunction } from "../../../../types/RecipeFunction"; -import { Vcard } from "../../../../types/Vcard"; +import * as serializers from "../../index"; +import * as Gooey from "../../../api/index"; +import * as core from "../../../core"; +import { RecipeFunction } from "../../types/RecipeFunction"; +import { Vcard } from "../../types/Vcard"; import { QrCodeGeneratorPageRequestImagePromptControlnetModelsItem } from "../../types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem"; import { QrCodeGeneratorPageRequestSelectedModel } from "../../types/QrCodeGeneratorPageRequestSelectedModel"; import { QrCodeGeneratorPageRequestSelectedControlnetModelItem } from "../../types/QrCodeGeneratorPageRequestSelectedControlnetModelItem"; import { QrCodeGeneratorPageRequestScheduler } from "../../types/QrCodeGeneratorPageRequestScheduler"; -import { RunSettings } from "../../../../types/RunSettings"; +import { RunSettings } from "../../types/RunSettings"; export const QrCodeGeneratorPageRequest: core.serialization.Schema< serializers.QrCodeGeneratorPageRequest.Raw, diff --git a/src/serialization/client/requests/index.ts b/src/serialization/client/requests/index.ts index 8fbc7f0..4ffba2c 100644 --- a/src/serialization/client/requests/index.ts +++ b/src/serialization/client/requests/index.ts @@ -1,4 +1,5 @@ export { DeforumSdPageRequest } from "./DeforumSdPageRequest"; +export { QrCodeGeneratorPageRequest } from "./QrCodeGeneratorPageRequest"; export { RelatedQnAPageRequest } from "./RelatedQnAPageRequest"; export { SeoSummaryPageRequest } from "./SeoSummaryPageRequest"; export { GoogleGptPageRequest } from "./GoogleGptPageRequest"; @@ -7,6 +8,7 @@ export { BulkRunnerPageRequest } from "./BulkRunnerPageRequest"; export { DocExtractPageRequest } from "./DocExtractPageRequest"; export { CompareLlmPageRequest } from "./CompareLlmPageRequest"; export { DocSearchPageRequest } from "./DocSearchPageRequest"; +export { DocSummaryPageRequest } from "./DocSummaryPageRequest"; export { LipsyncTtsPageRequest } from "./LipsyncTtsPageRequest"; export { TextToSpeechPageRequest } from "./TextToSpeechPageRequest"; export { AsrPageRequest } from "./AsrPageRequest"; @@ -20,4 +22,5 @@ export { EmailFaceInpaintingPageRequest } from "./EmailFaceInpaintingPageRequest export { GoogleImageGenPageRequest } from "./GoogleImageGenPageRequest"; export { ImageSegmentationPageRequest } from "./ImageSegmentationPageRequest"; export { CompareUpscalerPageRequest } from "./CompareUpscalerPageRequest"; +export { EmbeddingsPageRequest } from "./EmbeddingsPageRequest"; export { RelatedQnADocPageRequest } from "./RelatedQnADocPageRequest"; diff --git a/src/serialization/resources/aiArtQrCode/client/index.ts b/src/serialization/resources/aiArtQrCode/client/index.ts deleted file mode 100644 index 415726b..0000000 --- a/src/serialization/resources/aiArtQrCode/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/serialization/resources/aiArtQrCode/client/requests/index.ts b/src/serialization/resources/aiArtQrCode/client/requests/index.ts deleted file mode 100644 index dcca84e..0000000 --- a/src/serialization/resources/aiArtQrCode/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { QrCodeGeneratorPageRequest } from "./QrCodeGeneratorPageRequest"; diff --git a/src/serialization/resources/aiArtQrCode/index.ts b/src/serialization/resources/aiArtQrCode/index.ts deleted file mode 100644 index c9240f8..0000000 --- a/src/serialization/resources/aiArtQrCode/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./client"; diff --git a/src/serialization/resources/aiArtQrCode/types/index.ts b/src/serialization/resources/aiArtQrCode/types/index.ts deleted file mode 100644 index 691d1d7..0000000 --- a/src/serialization/resources/aiArtQrCode/types/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./QrCodeGeneratorPageRequestImagePromptControlnetModelsItem"; -export * from "./QrCodeGeneratorPageRequestSelectedModel"; -export * from "./QrCodeGeneratorPageRequestSelectedControlnetModelItem"; -export * from "./QrCodeGeneratorPageRequestScheduler"; diff --git a/src/api/resources/aiArtQrCode/client/index.ts b/src/serialization/resources/functions/client/index.ts similarity index 100% rename from src/api/resources/aiArtQrCode/client/index.ts rename to src/serialization/resources/functions/client/index.ts diff --git a/src/serialization/types/FunctionsPageRequest.ts b/src/serialization/resources/functions/client/requests/FunctionsPageRequest.ts similarity index 63% rename from src/serialization/types/FunctionsPageRequest.ts rename to src/serialization/resources/functions/client/requests/FunctionsPageRequest.ts index 7bd38b2..922029f 100644 --- a/src/serialization/types/FunctionsPageRequest.ts +++ b/src/serialization/resources/functions/client/requests/FunctionsPageRequest.ts @@ -2,14 +2,14 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../index"; -import * as Gooey from "../../api/index"; -import * as core from "../../core"; -import { RunSettings } from "./RunSettings"; +import * as serializers from "../../../../index"; +import * as Gooey from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { RunSettings } from "../../../../types/RunSettings"; -export const FunctionsPageRequest: core.serialization.ObjectSchema< +export const FunctionsPageRequest: core.serialization.Schema< serializers.FunctionsPageRequest.Raw, - Gooey.FunctionsPageRequest + Omit > = core.serialization.object({ code: core.serialization.string().optional(), variables: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), diff --git a/src/serialization/resources/functions/client/requests/index.ts b/src/serialization/resources/functions/client/requests/index.ts new file mode 100644 index 0000000..fe50ef3 --- /dev/null +++ b/src/serialization/resources/functions/client/requests/index.ts @@ -0,0 +1 @@ +export { FunctionsPageRequest } from "./FunctionsPageRequest"; diff --git a/src/api/resources/summarizeYourDocsWithGpt/index.ts b/src/serialization/resources/functions/index.ts similarity index 50% rename from src/api/resources/summarizeYourDocsWithGpt/index.ts rename to src/serialization/resources/functions/index.ts index c9240f8..5ec7692 100644 --- a/src/api/resources/summarizeYourDocsWithGpt/index.ts +++ b/src/serialization/resources/functions/index.ts @@ -1,2 +1 @@ -export * from "./types"; export * from "./client"; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 6355543..ad4ceda 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -2,22 +2,18 @@ export * as copilotIntegrations from "./copilotIntegrations"; export * from "./copilotIntegrations/types"; export * as copilotForYourEnterprise from "./copilotForYourEnterprise"; export * from "./copilotForYourEnterprise/types"; -export * as aiArtQrCode from "./aiArtQrCode"; -export * from "./aiArtQrCode/types"; export * as evaluator from "./evaluator"; export * from "./evaluator/types"; export * as smartGpt from "./smartGpt"; export * from "./smartGpt/types"; -export * as summarizeYourDocsWithGpt from "./summarizeYourDocsWithGpt"; -export * from "./summarizeYourDocsWithGpt/types"; export * as lipSyncing from "./lipSyncing"; export * from "./lipSyncing/types"; export * from "./copilotIntegrations/client/requests"; export * from "./copilotForYourEnterprise/client/requests"; -export * from "./aiArtQrCode/client/requests"; export * from "./evaluator/client/requests"; export * from "./smartGpt/client/requests"; -export * from "./summarizeYourDocsWithGpt/client/requests"; +export * as functions from "./functions"; +export * from "./functions/client/requests"; export * from "./lipSyncing/client/requests"; export * as misc from "./misc"; export * from "./misc/client/requests"; diff --git a/src/serialization/resources/summarizeYourDocsWithGpt/client/index.ts b/src/serialization/resources/summarizeYourDocsWithGpt/client/index.ts deleted file mode 100644 index 415726b..0000000 --- a/src/serialization/resources/summarizeYourDocsWithGpt/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./requests"; diff --git a/src/serialization/resources/summarizeYourDocsWithGpt/client/requests/index.ts b/src/serialization/resources/summarizeYourDocsWithGpt/client/requests/index.ts deleted file mode 100644 index 9109182..0000000 --- a/src/serialization/resources/summarizeYourDocsWithGpt/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { DocSummaryPageRequest } from "./DocSummaryPageRequest"; diff --git a/src/serialization/resources/summarizeYourDocsWithGpt/index.ts b/src/serialization/resources/summarizeYourDocsWithGpt/index.ts deleted file mode 100644 index c9240f8..0000000 --- a/src/serialization/resources/summarizeYourDocsWithGpt/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./types"; -export * from "./client"; diff --git a/src/serialization/resources/summarizeYourDocsWithGpt/types/index.ts b/src/serialization/resources/summarizeYourDocsWithGpt/types/index.ts deleted file mode 100644 index 15f811d..0000000 --- a/src/serialization/resources/summarizeYourDocsWithGpt/types/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./DocSummaryPageRequestSelectedModel"; -export * from "./DocSummaryPageRequestSelectedAsrModel"; -export * from "./DocSummaryPageRequestResponseFormatType"; diff --git a/src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestResponseFormatType.ts b/src/serialization/types/DocSummaryPageRequestResponseFormatType.ts similarity index 75% rename from src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestResponseFormatType.ts rename to src/serialization/types/DocSummaryPageRequestResponseFormatType.ts index 18010b2..09aacce 100644 --- a/src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestResponseFormatType.ts +++ b/src/serialization/types/DocSummaryPageRequestResponseFormatType.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../index"; -import * as Gooey from "../../../../api/index"; -import * as core from "../../../../core"; +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; export const DocSummaryPageRequestResponseFormatType: core.serialization.Schema< serializers.DocSummaryPageRequestResponseFormatType.Raw, diff --git a/src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedAsrModel.ts b/src/serialization/types/DocSummaryPageRequestSelectedAsrModel.ts similarity index 88% rename from src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedAsrModel.ts rename to src/serialization/types/DocSummaryPageRequestSelectedAsrModel.ts index 5852b5d..f659753 100644 --- a/src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedAsrModel.ts +++ b/src/serialization/types/DocSummaryPageRequestSelectedAsrModel.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../index"; -import * as Gooey from "../../../../api/index"; -import * as core from "../../../../core"; +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; export const DocSummaryPageRequestSelectedAsrModel: core.serialization.Schema< serializers.DocSummaryPageRequestSelectedAsrModel.Raw, diff --git a/src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedModel.ts b/src/serialization/types/DocSummaryPageRequestSelectedModel.ts similarity index 94% rename from src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedModel.ts rename to src/serialization/types/DocSummaryPageRequestSelectedModel.ts index 052a10a..88aeb54 100644 --- a/src/serialization/resources/summarizeYourDocsWithGpt/types/DocSummaryPageRequestSelectedModel.ts +++ b/src/serialization/types/DocSummaryPageRequestSelectedModel.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../index"; -import * as Gooey from "../../../../api/index"; -import * as core from "../../../../core"; +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; export const DocSummaryPageRequestSelectedModel: core.serialization.Schema< serializers.DocSummaryPageRequestSelectedModel.Raw, diff --git a/src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts b/src/serialization/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts similarity index 89% rename from src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts rename to src/serialization/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts index c68e9fd..0bb2c1d 100644 --- a/src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts +++ b/src/serialization/types/QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../index"; -import * as Gooey from "../../../../api/index"; -import * as core from "../../../../core"; +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; export const QrCodeGeneratorPageRequestImagePromptControlnetModelsItem: core.serialization.Schema< serializers.QrCodeGeneratorPageRequestImagePromptControlnetModelsItem.Raw, diff --git a/src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestScheduler.ts b/src/serialization/types/QrCodeGeneratorPageRequestScheduler.ts similarity index 87% rename from src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestScheduler.ts rename to src/serialization/types/QrCodeGeneratorPageRequestScheduler.ts index d569fb3..6887bc7 100644 --- a/src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestScheduler.ts +++ b/src/serialization/types/QrCodeGeneratorPageRequestScheduler.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../index"; -import * as Gooey from "../../../../api/index"; -import * as core from "../../../../core"; +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; export const QrCodeGeneratorPageRequestScheduler: core.serialization.Schema< serializers.QrCodeGeneratorPageRequestScheduler.Raw, diff --git a/src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts b/src/serialization/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts similarity index 89% rename from src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts rename to src/serialization/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts index 8eeaeae..c87f635 100644 --- a/src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts +++ b/src/serialization/types/QrCodeGeneratorPageRequestSelectedControlnetModelItem.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../index"; -import * as Gooey from "../../../../api/index"; -import * as core from "../../../../core"; +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; export const QrCodeGeneratorPageRequestSelectedControlnetModelItem: core.serialization.Schema< serializers.QrCodeGeneratorPageRequestSelectedControlnetModelItem.Raw, diff --git a/src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedModel.ts b/src/serialization/types/QrCodeGeneratorPageRequestSelectedModel.ts similarity index 87% rename from src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedModel.ts rename to src/serialization/types/QrCodeGeneratorPageRequestSelectedModel.ts index 9f15021..59283d9 100644 --- a/src/serialization/resources/aiArtQrCode/types/QrCodeGeneratorPageRequestSelectedModel.ts +++ b/src/serialization/types/QrCodeGeneratorPageRequestSelectedModel.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as serializers from "../../../index"; -import * as Gooey from "../../../../api/index"; -import * as core from "../../../../core"; +import * as serializers from "../index"; +import * as Gooey from "../../api/index"; +import * as core from "../../core"; export const QrCodeGeneratorPageRequestSelectedModel: core.serialization.Schema< serializers.QrCodeGeneratorPageRequestSelectedModel.Raw, diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index d814cfd..7edf2f7 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -1,4 +1,8 @@ export * from "./DeforumSdPageRequestSelectedModel"; +export * from "./QrCodeGeneratorPageRequestImagePromptControlnetModelsItem"; +export * from "./QrCodeGeneratorPageRequestSelectedModel"; +export * from "./QrCodeGeneratorPageRequestSelectedControlnetModelItem"; +export * from "./QrCodeGeneratorPageRequestScheduler"; export * from "./RelatedQnAPageRequestSelectedModel"; export * from "./RelatedQnAPageRequestEmbeddingModel"; export * from "./RelatedQnAPageRequestResponseFormatType"; @@ -19,6 +23,9 @@ export * from "./DocSearchPageRequestEmbeddingModel"; export * from "./DocSearchPageRequestSelectedModel"; export * from "./DocSearchPageRequestCitationStyle"; export * from "./DocSearchPageRequestResponseFormatType"; +export * from "./DocSummaryPageRequestSelectedModel"; +export * from "./DocSummaryPageRequestSelectedAsrModel"; +export * from "./DocSummaryPageRequestResponseFormatType"; export * from "./LipsyncTtsPageRequestTtsProvider"; export * from "./LipsyncTtsPageRequestOpenaiVoiceName"; export * from "./LipsyncTtsPageRequestOpenaiTtsModel"; @@ -41,6 +48,7 @@ export * from "./EmailFaceInpaintingPageRequestSelectedModel"; export * from "./GoogleImageGenPageRequestSelectedModel"; export * from "./ImageSegmentationPageRequestSelectedModel"; export * from "./CompareUpscalerPageRequestSelectedModelsItem"; +export * from "./EmbeddingsPageRequestSelectedModel"; export * from "./RelatedQnADocPageRequestKeywordQuery"; export * from "./RelatedQnADocPageRequestEmbeddingModel"; export * from "./RelatedQnADocPageRequestSelectedModel"; @@ -107,8 +115,6 @@ export * from "./EmailFaceInpaintingPageOutput"; export * from "./EmailFaceInpaintingPageResponse"; export * from "./EmailFaceInpaintingPageStatusResponse"; export * from "./EmbeddingsPageOutput"; -export * from "./EmbeddingsPageRequestSelectedModel"; -export * from "./EmbeddingsPageRequest"; export * from "./EmbeddingsPageResponse"; export * from "./EmbeddingsPageStatusResponse"; export * from "./EvalPrompt"; @@ -119,7 +125,6 @@ export * from "./FailedReponseModelV2"; export * from "./FailedResponseDetail"; export * from "./FinalResponse"; export * from "./FunctionsPageOutput"; -export * from "./FunctionsPageRequest"; export * from "./FunctionsPageResponse"; export * from "./FunctionsPageStatusResponse"; export * from "./GenericErrorResponse"; diff --git a/yarn.lock b/yarn.lock index 8146625..c1ee85d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -640,9 +640,9 @@ form-data "^4.0.0" "@types/node@*": - version "22.5.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.3.tgz#91a374e42c6e7ccb5893a87f1775f36ce1671d65" - integrity sha512-njripolh85IA9SQGTAqbmnNZTdxv7X/4OYGPz8tgy5JDr8MP+uDBa921GpYEoDDnwm0Hmn5ZPeJgiiSTPoOzkQ== + version "22.5.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8" + integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg== dependencies: undici-types "~6.19.2" @@ -905,9 +905,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001646: - version "1.0.30001655" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz#0ce881f5a19a2dcfda2ecd927df4d5c1684b982f" - integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg== + version "1.0.30001657" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001657.tgz#29fd504bffca719d1c6b63a1f6f840be1973a660" + integrity sha512-DPbJAlP8/BAXy3IgiWmZKItubb3TYGP0WscQQlVGIfT4s/YlFYVuJgyOsQNP7rJRChx/qdMeLJQJP0Sgg2yjNA== chalk@^2.4.2: version "2.4.2" @@ -1103,9 +1103,9 @@ domexception@^4.0.0: webidl-conversions "^7.0.0" electron-to-chromium@^1.5.4: - version "1.5.13" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" - integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== + version "1.5.14" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.14.tgz#8de5fd941f4deede999f90503c4b5923fbe1962b" + integrity sha512-bEfPECb3fJ15eaDnu9LEJ2vPGD6W1vt7vZleSVyFhYuMIKm3vz/g9lt7IvEzgdwj58RjbPKUF2rXTCN/UW47tQ== emittery@^0.13.1: version "0.13.1"