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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ 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
});
```

Expand Down
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## 3.0.0 - 2025-11-25
* feat: enhance IMDB movie data model with additional fields
* Add new metadata and ranking fields to the IMDB movie functionality, expanding the data model to support richer movie information. The CreateMovieRequest interface now requires additional metadata fields and ranking information, while the Movie interface has been restructured to remove the description field in favor of a metadata field and new rank field.
* Key changes:
* Add metadata, more_metadata, and rank fields to CreateMovieRequest interface
* Replace description field with metadata field in Movie interface
* Add rank field to Movie interface
* Update documentation examples to include new required fields
* Remove User-Agent header from default client headers
* Update test fixtures to match new data model 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": "3.0.0",
"private": false,
"repository": "github:fern-demo/autopilot-typescript-sdk",
"type": "commonjs",
Expand Down
5 changes: 4 additions & 1 deletion reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ 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
});

```
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": "3.0.0",
"User-Agent": "/3.0.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
5 changes: 4 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,10 @@ export class Imdb {
* @example
* await client.imdb.createMovie({
* title: "title",
* rating: 1.1
* rating: 1.1,
* metadata: "metadata",
* more_metadata: "more_metadata",
* rank: 1
* })
*/
public createMovie(
Expand Down
3 changes: 3 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,7 @@
export interface CreateMovieRequest {
title: string;
rating: number;
metadata: string;
more_metadata: string;
rank: number;
}
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 = "3.0.0";
15 changes: 12 additions & 3 deletions tests/wire/imdb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ 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,
};
const rawResponseBody = "string";
server
.mockEndpoint()
Expand All @@ -22,6 +28,9 @@ describe("Imdb", () => {
const response = await client.imdb.createMovie({
title: "title",
rating: 1.1,
metadata: "metadata",
more_metadata: "more_metadata",
rank: 1,
});
expect(response).toEqual("string");
});
Expand All @@ -34,8 +43,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 +53,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