Skip to content

Commit

Permalink
Release v0.2.17
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Mar 7, 2024
1 parent 4641bc7 commit 2e2a33e
Show file tree
Hide file tree
Showing 19 changed files with 2,480 additions and 67 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,21 @@ jobs:
- name: Compile
run: yarn && yarn build

test:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3

- name: Compile
run: yarn && yarn test

publish:
needs: [ compile ]
needs: [ compile, test ]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

Expand Down
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
};
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "superagentai-js",
"version": "v0.2.16",
"version": "v0.2.17",
"private": false,
"repository": "https://github.com/homanp/superagent-js",
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
"format": "prettier --write 'src/**/*.ts'",
"build": "tsc",
"prepack": "cp -rv dist/. ."
"prepack": "cp -rv dist/. .",
"test": "jest"
},
"dependencies": {
"url-join": "4.0.1",
Expand All @@ -21,6 +22,9 @@
"@types/url-join": "4.0.1",
"@types/qs": "6.9.8",
"@types/node-fetch": "2.6.9",
"jest": "^29.7.0",
"@types/jest": "^29.5.5",
"ts-jest": "^29.1.1",
"@types/node": "17.0.33",
"prettier": "2.7.1",
"typescript": "4.6.4"
Expand Down
62 changes: 45 additions & 17 deletions src/api/resources/agent/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export class Agent {
* @throws {@link SuperAgent.UnprocessableEntityError}
*
* @example
* await superAgent.agent.list({})
* await superAgent.agent.list()
*/
public async list(
request: SuperAgent.ListApiV1AgentsGetRequest = {},
requestOptions?: Agent.RequestOptions
): Promise<SuperAgent.AgentList> {
const { skip, take } = request;
const _queryParams: Record<string, string | string[]> = {};
const _queryParams: Record<string, string | string[] | object | object[]> = {};
if (skip != null) {
_queryParams["skip"] = skip.toString();
}
Expand All @@ -55,7 +55,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -131,7 +133,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -202,7 +206,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -269,7 +275,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -318,7 +326,7 @@ export class Agent {
* @throws {@link SuperAgent.UnprocessableEntityError}
*
* @example
* await superAgent.agent.update("string", {})
* await superAgent.agent.update("string")
*/
public async update(
agentId: string,
Expand All @@ -335,7 +343,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AgentUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -411,7 +421,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestAgentInvoke.jsonOrThrow(request, {
Expand Down Expand Up @@ -487,7 +499,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestAgentLlm.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -555,7 +569,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -617,7 +633,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -690,7 +708,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestAgentTool.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -758,7 +778,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -823,7 +845,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -896,7 +920,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestAgentDatasource.jsonOrThrow(request, {
Expand Down Expand Up @@ -970,7 +996,9 @@ export class Agent {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down
16 changes: 12 additions & 4 deletions src/api/resources/apiKey/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export class ApiKey {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -101,7 +103,9 @@ export class ApiKey {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestApiKey.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -172,7 +176,9 @@ export class ApiKey {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -245,7 +251,9 @@ export class ApiKey {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestApiKey.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down
16 changes: 12 additions & 4 deletions src/api/resources/apiUser/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export class ApiUser {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestApiUser.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -114,7 +116,9 @@ export class ApiUser {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -168,7 +172,9 @@ export class ApiUser {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -223,7 +229,9 @@ export class ApiUser {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestApiUser.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down
24 changes: 17 additions & 7 deletions src/api/resources/datasource/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export class Datasource {
* @throws {@link SuperAgent.UnprocessableEntityError}
*
* @example
* await superAgent.datasource.list({})
* await superAgent.datasource.list()
*/
public async list(
request: SuperAgent.ListApiV1DatasourcesGetRequest = {},
requestOptions?: Datasource.RequestOptions
): Promise<SuperAgent.DatasourceList> {
const { skip, take } = request;
const _queryParams: Record<string, string | string[]> = {};
const _queryParams: Record<string, string | string[] | object | object[]> = {};
if (skip != null) {
_queryParams["skip"] = skip.toString();
}
Expand All @@ -55,7 +55,9 @@ export class Datasource {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -129,7 +131,9 @@ export class Datasource {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestDatasource.jsonOrThrow(request, {
Expand Down Expand Up @@ -202,7 +206,9 @@ export class Datasource {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -269,7 +275,9 @@ export class Datasource {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand Down Expand Up @@ -338,7 +346,9 @@ export class Datasource {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "superagentai-js",
"X-Fern-SDK-Version": "v0.2.16",
"X-Fern-SDK-Version": "v0.2.17",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
contentType: "application/json",
body: await serializers.AppModelsRequestDatasource.jsonOrThrow(request, {
Expand Down
Loading

0 comments on commit 2e2a33e

Please sign in to comment.