Skip to content

Commit

Permalink
Release 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jul 31, 2024
1 parent 65af7e9 commit d5e0ef0
Show file tree
Hide file tree
Showing 120 changed files with 1,065 additions and 1,208 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Instantiate and use the client with the following:
```typescript
import { GooeyClient } from "gooey";

const client = new GooeyClient({ apiKey: "YOUR_API_KEY", authorization: "YOUR_AUTHORIZATION" });
const client = new GooeyClient({ token: "YOUR_TOKEN" });
await client.copilotIntegrations.videoBotsStreamCreate({
integrationId: "integration_id",
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gooey",
"version": "0.0.1-beta0",
"version": "0.0.1",
"private": false,
"repository": "https://github.com/GooeyAI/typescript-sdk",
"main": "./index.js",
Expand Down
40 changes: 0 additions & 40 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5229,43 +5229,3 @@ 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>
8 changes: 2 additions & 6 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ import { Misc } from "./api/resources/misc/client/Client";
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>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
}

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

export class GooeyClient {
constructor(protected readonly _options: GooeyClient.Options = {}) {}
constructor(protected readonly _options: GooeyClient.Options) {}

protected _copilotIntegrations: CopilotIntegrations | undefined;

Expand Down
31 changes: 6 additions & 25 deletions src/api/resources/aiAnimationGenerator/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import * as errors from "../../../../errors/index";
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>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
}

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

export class AiAnimationGenerator {
constructor(protected readonly _options: AiAnimationGenerator.Options = {}) {}
constructor(protected readonly _options: AiAnimationGenerator.Options) {}

/**
* @param {Gooey.DeforumSdPageRequest} request
Expand Down Expand Up @@ -64,10 +60,9 @@ export class AiAnimationGenerator {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 @@ -173,10 +168,9 @@ export class AiAnimationGenerator {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 @@ -272,10 +266,9 @@ export class AiAnimationGenerator {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 @@ -342,18 +335,6 @@ export class AiAnimationGenerator {
}

protected async _getAuthorizationHeader(): Promise<string> {
const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"];
if (bearer == null) {
throw new errors.GooeyError({
message: "Please specify GOOEY_API_KEY when instantiating the client.",
});
}

return `Bearer ${bearer}`;
}

protected async _getCustomAuthorizationHeaders() {
const authorizationValue = await core.Supplier.get(this._options.authorization);
return { Authorization: authorizationValue };
return `Bearer ${await core.Supplier.get(this._options.token)}`;
}
}
31 changes: 6 additions & 25 deletions src/api/resources/aiArtQrCode/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import * as errors from "../../../../errors/index";
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>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
}

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

export class AiArtQrCode {
constructor(protected readonly _options: AiArtQrCode.Options = {}) {}
constructor(protected readonly _options: AiArtQrCode.Options) {}

/**
* @param {Gooey.QrCodeGeneratorPageRequest} request
Expand Down Expand Up @@ -61,10 +57,9 @@ export class AiArtQrCode {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 +162,9 @@ export class AiArtQrCode {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 @@ -266,10 +260,9 @@ export class AiArtQrCode {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 @@ -336,18 +329,6 @@ export class AiArtQrCode {
}

protected async _getAuthorizationHeader(): Promise<string> {
const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"];
if (bearer == null) {
throw new errors.GooeyError({
message: "Please specify GOOEY_API_KEY when instantiating the client.",
});
}

return `Bearer ${bearer}`;
}

protected async _getCustomAuthorizationHeaders() {
const authorizationValue = await core.Supplier.get(this._options.authorization);
return { Authorization: authorizationValue };
return `Bearer ${await core.Supplier.get(this._options.token)}`;
}
}
31 changes: 6 additions & 25 deletions src/api/resources/aiBackgroundChanger/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import * as errors from "../../../../errors/index";
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>;
token: core.Supplier<core.BearerToken>;
fetcher?: core.FetchFunction;
}

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

export class AiBackgroundChanger {
constructor(protected readonly _options: AiBackgroundChanger.Options = {}) {}
constructor(protected readonly _options: AiBackgroundChanger.Options) {}

/**
* @param {Gooey.ImageSegmentationPageRequest} request
Expand Down Expand Up @@ -61,10 +57,9 @@ export class AiBackgroundChanger {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 +162,9 @@ export class AiBackgroundChanger {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 @@ -266,10 +260,9 @@ export class AiBackgroundChanger {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "gooey",
"X-Fern-SDK-Version": "0.0.1-beta0",
"X-Fern-SDK-Version": "0.0.1",
"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 @@ -336,18 +329,6 @@ export class AiBackgroundChanger {
}

protected async _getAuthorizationHeader(): Promise<string> {
const bearer = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["GOOEY_API_KEY"];
if (bearer == null) {
throw new errors.GooeyError({
message: "Please specify GOOEY_API_KEY when instantiating the client.",
});
}

return `Bearer ${bearer}`;
}

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

0 comments on commit d5e0ef0

Please sign in to comment.