Skip to content

Commit

Permalink
Release 0.0.1-beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Aug 2, 2024
1 parent 3fbefb5 commit f340ab8
Show file tree
Hide file tree
Showing 168 changed files with 1,292 additions and 1,185 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# 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)
[![npm shield](https://img.shields.io/npm/v/gooeyai)](https://www.npmjs.com/package/gooeyai)

The Gooey TypeScript library provides convenient access to the Gooey API from TypeScript.

## Installation

```sh
npm i -s gooey
npm i -s gooeyai
```

## Usage

Instantiate and use the client with the following:

```typescript
import { GooeyClient } from "gooey";
import { GooeyClient } from "gooeyai";

const client = new GooeyClient({ apiKey: "YOUR_API_KEY" });
const client = new GooeyClient({ apiKey: "YOUR_API_KEY", authorization: "YOUR_AUTHORIZATION" });
await client.copilotIntegrations.videoBotsStreamCreate({
integrationId: "integration_id",
});
Expand All @@ -30,7 +30,7 @@ The SDK exports all request and response types as TypeScript interfaces. Simply
following namespace:

```typescript
import { Gooey } from "gooey";
import { Gooey } from "gooeyai";

const request: Gooey.CreateStreamRequest = {
...
Expand All @@ -43,7 +43,7 @@ When the API returns a non-success status code (4xx or 5xx response), a subclass
will be thrown.

```typescript
import { GooeyError } from "gooey";
import { GooeyError } from "gooeyai";

try {
await client.copilotIntegrations.videoBotsStreamCreate(...);
Expand Down Expand Up @@ -118,7 +118,7 @@ The SDK provides a way for your to customize the underlying HTTP client / Fetch
unsupported environment, this provides a way for you to break glass and ensure the SDK works.

```typescript
import { GooeyClient } from "gooey";
import { GooeyClient } from "gooeyai";

const client = new GooeyClient({
...
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gooey",
"version": "0.0.1-beta1",
"name": "gooeyai",
"version": "0.0.1-beta2",
"private": false,
"repository": "https://github.com/GooeyAI/typescript-sdk",
"main": "./index.js",
Expand Down
40 changes: 40 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5229,3 +5229,43 @@ await client.misc.videoBotsBroadcast({
</dd>
</dl>
</details>

<details><summary><code>client.misc.<a href="/src/api/resources/misc/client/Client.ts">health</a>() -> unknown</code></summary>
<dl>
<dd>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.misc.health();
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**requestOptions:** `Misc.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>
4 changes: 4 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export declare namespace GooeyClient {
interface Options {
environment?: core.Supplier<environments.GooeyEnvironment | string>;
apiKey?: core.Supplier<core.BearerToken | undefined>;
/** Override the Authorization header */
authorization?: core.Supplier<string | undefined>;
fetcher?: core.FetchFunction;
}

Expand All @@ -54,6 +56,8 @@ export declare namespace GooeyClient {
maxRetries?: number;
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Authorization header */
authorization?: string | undefined;
}
}

Expand Down
24 changes: 18 additions & 6 deletions src/api/resources/aiAnimationGenerator/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export declare namespace AiAnimationGenerator {
interface Options {
environment?: core.Supplier<environments.GooeyEnvironment | string>;
apiKey?: core.Supplier<core.BearerToken | undefined>;
/** Override the Authorization header */
authorization?: core.Supplier<string | undefined>;
fetcher?: core.FetchFunction;
}

Expand All @@ -23,6 +25,8 @@ export declare namespace AiAnimationGenerator {
maxRetries?: number;
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Authorization header */
authorization?: string | undefined;
}
}

Expand Down Expand Up @@ -59,10 +63,11 @@ export class AiAnimationGenerator {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 64 in src/api/resources/aiAnimationGenerator/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 64 in src/api/resources/aiAnimationGenerator/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -167,10 +172,11 @@ export class AiAnimationGenerator {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 173 in src/api/resources/aiAnimationGenerator/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 173 in src/api/resources/aiAnimationGenerator/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -265,10 +271,11 @@ export class AiAnimationGenerator {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 272 in src/api/resources/aiAnimationGenerator/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 272 in src/api/resources/aiAnimationGenerator/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -344,4 +351,9 @@ export class AiAnimationGenerator {

return `Bearer ${bearer}`;
}

protected async _getCustomAuthorizationHeaders() {
const authorizationValue = await core.Supplier.get(this._options.authorization);
return { Authorization: authorizationValue };
}
}
24 changes: 18 additions & 6 deletions src/api/resources/aiArtQrCode/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export declare namespace AiArtQrCode {
interface Options {
environment?: core.Supplier<environments.GooeyEnvironment | string>;
apiKey?: core.Supplier<core.BearerToken | undefined>;
/** Override the Authorization header */
authorization?: core.Supplier<string | undefined>;
fetcher?: core.FetchFunction;
}

Expand All @@ -23,6 +25,8 @@ export declare namespace AiArtQrCode {
maxRetries?: number;
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Authorization header */
authorization?: string | undefined;
}
}

Expand Down Expand Up @@ -56,10 +60,11 @@ export class AiArtQrCode {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 61 in src/api/resources/aiArtQrCode/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 61 in src/api/resources/aiArtQrCode/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -161,10 +166,11 @@ export class AiArtQrCode {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 167 in src/api/resources/aiArtQrCode/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 167 in src/api/resources/aiArtQrCode/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -259,10 +265,11 @@ export class AiArtQrCode {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 266 in src/api/resources/aiArtQrCode/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 266 in src/api/resources/aiArtQrCode/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -338,4 +345,9 @@ export class AiArtQrCode {

return `Bearer ${bearer}`;
}

protected async _getCustomAuthorizationHeaders() {
const authorizationValue = await core.Supplier.get(this._options.authorization);
return { Authorization: authorizationValue };
}
}
24 changes: 18 additions & 6 deletions src/api/resources/aiBackgroundChanger/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export declare namespace AiBackgroundChanger {
interface Options {
environment?: core.Supplier<environments.GooeyEnvironment | string>;
apiKey?: core.Supplier<core.BearerToken | undefined>;
/** Override the Authorization header */
authorization?: core.Supplier<string | undefined>;
fetcher?: core.FetchFunction;
}

Expand All @@ -23,6 +25,8 @@ export declare namespace AiBackgroundChanger {
maxRetries?: number;
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Authorization header */
authorization?: string | undefined;
}
}

Expand Down Expand Up @@ -56,10 +60,11 @@ export class AiBackgroundChanger {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 61 in src/api/resources/aiBackgroundChanger/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 61 in src/api/resources/aiBackgroundChanger/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -161,10 +166,11 @@ export class AiBackgroundChanger {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 167 in src/api/resources/aiBackgroundChanger/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 167 in src/api/resources/aiBackgroundChanger/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -259,10 +265,11 @@ export class AiBackgroundChanger {
headers: {
Authorization: await this._getAuthorizationHeader(),

Check failure on line 266 in src/api/resources/aiBackgroundChanger/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.

Check failure on line 266 in src/api/resources/aiBackgroundChanger/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

'Authorization' is specified more than once, so this usage will be overwritten.
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta1",
"X-Fern-SDK-Name": "gooeyai",
"X-Fern-SDK-Version": "0.0.1-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -338,4 +345,9 @@ export class AiBackgroundChanger {

return `Bearer ${bearer}`;
}

protected async _getCustomAuthorizationHeaders() {
const authorizationValue = await core.Supplier.get(this._options.authorization);
return { Authorization: authorizationValue };
}
}
Loading

0 comments on commit f340ab8

Please sign in to comment.