@@ -4,7 +4,6 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
44import { mergeHeaders } from "../../../../core/headers.js" ;
55import * as core from "../../../../core/index.js" ;
66import * as errors from "../../../../errors/index.js" ;
7- import * as serializers from "../../../../serialization/index.js" ;
87import * as FernAutopilotTestApi from "../../../index.js" ;
98
109export declare namespace Imdb {
@@ -30,7 +29,7 @@ export class Imdb {
3029 * await client.imdb.createMovie({
3130 * title: "title",
3231 * rating: 1.1,
33- * moreMetadata : 1,
32+ * more_metadata : 1,
3433 * rank: 1
3534 * })
3635 */
@@ -57,27 +56,15 @@ export class Imdb {
5756 contentType : "application/json" ,
5857 queryParameters : requestOptions ?. queryParams ,
5958 requestType : "json" ,
60- body : serializers . CreateMovieRequest . jsonOrThrow ( request , {
61- unrecognizedObjectKeys : "strip" ,
62- omitUndefined : true ,
63- } ) ,
59+ body : request ,
6460 timeoutMs : ( requestOptions ?. timeoutInSeconds ?? this . _options ?. timeoutInSeconds ?? 60 ) * 1000 ,
6561 maxRetries : requestOptions ?. maxRetries ?? this . _options ?. maxRetries ,
6662 abortSignal : requestOptions ?. abortSignal ,
6763 fetchFn : this . _options ?. fetch ,
6864 logging : this . _options . logging ,
6965 } ) ;
7066 if ( _response . ok ) {
71- return {
72- data : serializers . MovieId . parseOrThrow ( _response . body , {
73- unrecognizedObjectKeys : "passthrough" ,
74- allowUnrecognizedUnionMembers : true ,
75- allowUnrecognizedEnumValues : true ,
76- skipValidation : true ,
77- breadcrumbsPrefix : [ "response" ] ,
78- } ) ,
79- rawResponse : _response . rawResponse ,
80- } ;
67+ return { data : _response . body as FernAutopilotTestApi . MovieId , rawResponse : _response . rawResponse } ;
8168 }
8269
8370 if ( _response . error . reason === "status-code" ) {
@@ -137,7 +124,7 @@ export class Imdb {
137124 url : core . url . join (
138125 ( await core . Supplier . get ( this . _options . baseUrl ) ) ??
139126 ( await core . Supplier . get ( this . _options . environment ) ) ,
140- `/movies/${ core . url . encodePathParam ( serializers . MovieId . jsonOrThrow ( id , { omitUndefined : true } ) ) } ` ,
127+ `/movies/${ core . url . encodePathParam ( id ) } ` ,
141128 ) ,
142129 method : "GET" ,
143130 headers : _headers ,
@@ -149,29 +136,14 @@ export class Imdb {
149136 logging : this . _options . logging ,
150137 } ) ;
151138 if ( _response . ok ) {
152- return {
153- data : serializers . Movie . parseOrThrow ( _response . body , {
154- unrecognizedObjectKeys : "passthrough" ,
155- allowUnrecognizedUnionMembers : true ,
156- allowUnrecognizedEnumValues : true ,
157- skipValidation : true ,
158- breadcrumbsPrefix : [ "response" ] ,
159- } ) ,
160- rawResponse : _response . rawResponse ,
161- } ;
139+ return { data : _response . body as FernAutopilotTestApi . Movie , rawResponse : _response . rawResponse } ;
162140 }
163141
164142 if ( _response . error . reason === "status-code" ) {
165143 switch ( _response . error . statusCode ) {
166144 case 404 :
167145 throw new FernAutopilotTestApi . MovieDoesNotExistError (
168- serializers . MovieId . parseOrThrow ( _response . error . body , {
169- unrecognizedObjectKeys : "passthrough" ,
170- allowUnrecognizedUnionMembers : true ,
171- allowUnrecognizedEnumValues : true ,
172- skipValidation : true ,
173- breadcrumbsPrefix : [ "response" ] ,
174- } ) ,
146+ _response . error . body as FernAutopilotTestApi . MovieId ,
175147 _response . rawResponse ,
176148 ) ;
177149 default :
0 commit comments