Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ import { FernAutopilotTestApiClient } from "";
const client = new FernAutopilotTestApiClient({ environment: "YOUR_BASE_URL" });
await client.imdb.createMovie({
title: "title",
rating: 1.1
rating: 1.1,
metadata: "metadata",
more_metadata: "more_metadata",
rank: 1,
option: "option"
});
```

Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## 2.1.0 - 2025-11-25
* feat: add new fields to CreateMovieRequest and update Movie interface
* This change expands the movie creation API by adding several new fields to the CreateMovieRequest and updating the Movie interface structure. The API now supports additional metadata fields and ranking information, making it more comprehensive for movie management.
* Key changes:
* Add metadata, more_metadata, rank, and option fields to CreateMovieRequest interface
* Remove description field and add rank field to Movie interface
* Update User-Agent header handling in client configuration
* Update documentation examples and tests to reflect new API structure
* 🌿 Generated with Fern

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "",
"version": "2.0.0",
"version": "2.1.0",
"private": false,
"repository": "github:fern-demo/autopilot-typescript-sdk",
"type": "commonjs",
Expand Down
6 changes: 5 additions & 1 deletion reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ Add a movie to the database
```typescript
await client.imdb.createMovie({
title: "title",
rating: 1.1
rating: 1.1,
metadata: "metadata",
more_metadata: "more_metadata",
rank: 1,
option: "option"
});

```
Expand Down
4 changes: 2 additions & 2 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export class FernAutopilotTestApiClient {
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "2.0.0",
"User-Agent": "/2.0.0",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "/2.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
6 changes: 5 additions & 1 deletion src/api/resources/imdb/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ export class Imdb {
* @example
* await client.imdb.createMovie({
* title: "title",
* rating: 1.1
* rating: 1.1,
* metadata: "metadata",
* more_metadata: "more_metadata",
* rank: 1,
* option: "option"
* })
*/
public createMovie(
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/imdb/types/CreateMovieRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
export interface CreateMovieRequest {
title: string;
rating: number;
metadata: string;
more_metadata: string;
rank: number;
option: string;
}
2 changes: 1 addition & 1 deletion src/api/resources/imdb/types/Movie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export interface Movie {
title: string;
/** The rating scale out of ten stars */
rating: number;
description: string;
metadata: string;
rank: number;
}
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = "2.0.0";
export const SDK_VERSION = "2.1.0";
17 changes: 14 additions & 3 deletions tests/wire/imdb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ describe("Imdb", () => {
test("createMovie", async () => {
const server = mockServerPool.createServer();
const client = new FernAutopilotTestApiClient({ environment: server.baseUrl });
const rawRequestBody = { title: "title", rating: 1.1 };
const rawRequestBody = {
title: "title",
rating: 1.1,
metadata: "metadata",
more_metadata: "more_metadata",
rank: 1,
option: "option",
};
const rawResponseBody = "string";
server
.mockEndpoint()
Expand All @@ -22,6 +29,10 @@ describe("Imdb", () => {
const response = await client.imdb.createMovie({
title: "title",
rating: 1.1,
metadata: "metadata",
more_metadata: "more_metadata",
rank: 1,
option: "option",
});
expect(response).toEqual("string");
});
Expand All @@ -34,8 +45,8 @@ describe("Imdb", () => {
id: "tt0111161",
title: "The Shawshank Redemption",
rating: 9.3,
description: "A story of hope and redemption.",
metadata: "hey",
rank: 1,
};
server.mockEndpoint().get("/movies/tt0111161").respondWith().statusCode(200).jsonBody(rawResponseBody).build();

Expand All @@ -44,8 +55,8 @@ describe("Imdb", () => {
id: "tt0111161",
title: "The Shawshank Redemption",
rating: 9.3,
description: "A story of hope and redemption.",
metadata: "hey",
rank: 1,
});
});

Expand Down