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

Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## 3.0.0 - 2025-11-20
* feat: add metadata fields and remove description from Movie API
* Update the IMDB API to include additional metadata fields in movie creation while streamlining the Movie interface. The createMovie endpoint now accepts metadata and more_metadata parameters, and the Movie type no longer includes a description field to reduce complexity.
* Key changes:
* Add metadata and more_metadata fields to CreateMovieRequest interface
* Remove description field from Movie interface to simplify data model
* Update all examples and tests to reflect new API structure
* Remove User-Agent header from client configuration
* 🌿 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
4 changes: 3 additions & 1 deletion reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ 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"
});

```
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
4 changes: 3 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,9 @@ export class Imdb {
* @example
* await client.imdb.createMovie({
* title: "title",
* rating: 1.1
* rating: 1.1,
* metadata: "metadata",
* more_metadata: "more_metadata"
* })
*/
public createMovie(
Expand Down
2 changes: 2 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,6 @@
export interface CreateMovieRequest {
title: string;
rating: number;
metadata: string;
more_metadata: string;
}
1 change: 0 additions & 1 deletion src/api/resources/imdb/types/Movie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ export interface Movie {
title: string;
/** The rating scale out of ten stars */
rating: number;
description: string;
metadata: string;
}
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";
13 changes: 4 additions & 9 deletions tests/wire/imdb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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" };
const rawResponseBody = "string";
server
.mockEndpoint()
Expand All @@ -22,6 +22,8 @@ describe("Imdb", () => {
const response = await client.imdb.createMovie({
title: "title",
rating: 1.1,
metadata: "metadata",
more_metadata: "more_metadata",
});
expect(response).toEqual("string");
});
Expand All @@ -30,21 +32,14 @@ describe("Imdb", () => {
const server = mockServerPool.createServer();
const client = new FernAutopilotTestApiClient({ environment: server.baseUrl });

const rawResponseBody = {
id: "tt0111161",
title: "The Shawshank Redemption",
rating: 9.3,
description: "A story of hope and redemption.",
metadata: "hey",
};
const rawResponseBody = { id: "tt0111161", title: "The Shawshank Redemption", rating: 9.3, metadata: "hey" };
server.mockEndpoint().get("/movies/tt0111161").respondWith().statusCode(200).jsonBody(rawResponseBody).build();

const response = await client.imdb.getMovie("tt0111161");
expect(response).toEqual({
id: "tt0111161",
title: "The Shawshank Redemption",
rating: 9.3,
description: "A story of hope and redemption.",
metadata: "hey",
});
});
Expand Down