Skip to content

Commit 449546d

Browse files
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
1 parent f051752 commit 449546d

File tree

10 files changed

+44
-11
lines changed

10 files changed

+44
-11
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ import { FernAutopilotTestApiClient } from "";
2525
const client = new FernAutopilotTestApiClient({ environment: "YOUR_BASE_URL" });
2626
await client.imdb.createMovie({
2727
title: "title",
28-
rating: 1.1
28+
rating: 1.1,
29+
metadata: "metadata",
30+
more_metadata: "more_metadata",
31+
rank: 1
2932
});
3033
```
3134

changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## 3.0.0 - 2025-11-25
2+
* feat: enhance IMDB movie data model with additional fields
3+
* 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.
4+
* Key changes:
5+
* Add metadata, more_metadata, and rank fields to CreateMovieRequest interface
6+
* Replace description field with metadata field in Movie interface
7+
* Add rank field to Movie interface
8+
* Update documentation examples to include new required fields
9+
* Remove User-Agent header from default client headers
10+
* Update test fixtures to match new data model structure
11+
* 🌿 Generated with Fern
12+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "",
3-
"version": "2.0.0",
3+
"version": "3.0.0",
44
"private": false,
55
"repository": "github:fern-demo/autopilot-typescript-sdk",
66
"type": "commonjs",

reference.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ Add a movie to the database
2929
```typescript
3030
await client.imdb.createMovie({
3131
title: "title",
32-
rating: 1.1
32+
rating: 1.1,
33+
metadata: "metadata",
34+
more_metadata: "more_metadata",
35+
rank: 1
3336
});
3437

3538
```

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export class FernAutopilotTestApiClient {
2323
{
2424
"X-Fern-Language": "JavaScript",
2525
"X-Fern-SDK-Name": "",
26-
"X-Fern-SDK-Version": "2.0.0",
27-
"User-Agent": "/2.0.0",
26+
"X-Fern-SDK-Version": "3.0.0",
27+
"User-Agent": "/3.0.0",
2828
"X-Fern-Runtime": core.RUNTIME.type,
2929
"X-Fern-Runtime-Version": core.RUNTIME.version,
3030
},

src/api/resources/imdb/client/Client.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export class Imdb {
2828
* @example
2929
* await client.imdb.createMovie({
3030
* title: "title",
31-
* rating: 1.1
31+
* rating: 1.1,
32+
* metadata: "metadata",
33+
* more_metadata: "more_metadata",
34+
* rank: 1
3235
* })
3336
*/
3437
public createMovie(

src/api/resources/imdb/types/CreateMovieRequest.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
export interface CreateMovieRequest {
44
title: string;
55
rating: number;
6+
metadata: string;
7+
more_metadata: string;
8+
rank: number;
69
}

src/api/resources/imdb/types/Movie.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export interface Movie {
77
title: string;
88
/** The rating scale out of ten stars */
99
rating: number;
10-
description: string;
1110
metadata: string;
11+
rank: number;
1212
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SDK_VERSION = "2.0.0";
1+
export const SDK_VERSION = "3.0.0";

tests/wire/imdb.test.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ describe("Imdb", () => {
88
test("createMovie", async () => {
99
const server = mockServerPool.createServer();
1010
const client = new FernAutopilotTestApiClient({ environment: server.baseUrl });
11-
const rawRequestBody = { title: "title", rating: 1.1 };
11+
const rawRequestBody = {
12+
title: "title",
13+
rating: 1.1,
14+
metadata: "metadata",
15+
more_metadata: "more_metadata",
16+
rank: 1,
17+
};
1218
const rawResponseBody = "string";
1319
server
1420
.mockEndpoint()
@@ -22,6 +28,9 @@ describe("Imdb", () => {
2228
const response = await client.imdb.createMovie({
2329
title: "title",
2430
rating: 1.1,
31+
metadata: "metadata",
32+
more_metadata: "more_metadata",
33+
rank: 1,
2534
});
2635
expect(response).toEqual("string");
2736
});
@@ -34,8 +43,8 @@ describe("Imdb", () => {
3443
id: "tt0111161",
3544
title: "The Shawshank Redemption",
3645
rating: 9.3,
37-
description: "A story of hope and redemption.",
3846
metadata: "hey",
47+
rank: 1,
3948
};
4049
server.mockEndpoint().get("/movies/tt0111161").respondWith().statusCode(200).jsonBody(rawResponseBody).build();
4150

@@ -44,8 +53,8 @@ describe("Imdb", () => {
4453
id: "tt0111161",
4554
title: "The Shawshank Redemption",
4655
rating: 9.3,
47-
description: "A story of hope and redemption.",
4856
metadata: "hey",
57+
rank: 1,
4958
});
5059
});
5160

0 commit comments

Comments
 (0)