@@ -124,7 +124,7 @@ export type UpdatePreviewRequestParams = Omit<
124124> ;
125125
126126export type PreviewRequestOptions = {
127- ignoreDefaults ?: boolean ;
127+ ignoreBaseConfig ?: boolean ;
128128} ;
129129
130130export type PreviewDefaults = {
@@ -184,8 +184,8 @@ export async function createPreview(
184184 request : CreatePreviewRequestParams ,
185185 options ?: PreviewRequestOptions
186186) : Promise < PreviewResource > {
187- const queryParams = options ?. ignoreDefaults
188- ? new URLSearchParams ( { ignore_defaults : "true" } )
187+ const queryParams = options ?. ignoreBaseConfig
188+ ? new URLSearchParams ( { ignore_base_config : "true" } )
189189 : undefined ;
190190
191191 return fetchResult < PreviewResource > (
@@ -205,13 +205,8 @@ export async function editPreview(
205205 accountId : string ,
206206 workerName : string ,
207207 previewIdentifier : string ,
208- request : UpdatePreviewRequestParams ,
209- options ?: PreviewRequestOptions
208+ request : UpdatePreviewRequestParams
210209) : Promise < PreviewResource > {
211- const queryParams = options ?. ignoreDefaults
212- ? new URLSearchParams ( { ignore_defaults : "true" } )
213- : undefined ;
214-
215210 return fetchResult < PreviewResource > (
216211 config ,
217212 `/accounts/${ accountId } /workers/workers/${ workerName } /previews/${ encodeURIComponent (
@@ -221,8 +216,7 @@ export async function editPreview(
221216 method : "PATCH" ,
222217 headers : { "Content-Type" : "application/json" } ,
223218 body : JSON . stringify ( request ) ,
224- } ,
225- queryParams
219+ }
226220 ) ;
227221}
228222
@@ -263,13 +257,8 @@ export async function createPreviewDeployment(
263257 accountId : string ,
264258 workerName : string ,
265259 previewIdentifier : string ,
266- request : Partial < CreatePreviewDeploymentRequestParams > ,
267- options ?: PreviewRequestOptions
260+ request : Partial < CreatePreviewDeploymentRequestParams >
268261) : Promise < DeploymentResource > {
269- const queryParams = options ?. ignoreDefaults
270- ? new URLSearchParams ( { ignore_defaults : "true" } )
271- : undefined ;
272-
273262 return fetchResult < DeploymentResource > (
274263 config ,
275264 `/accounts/${ accountId } /workers/workers/${ workerName } /previews/${ encodeURIComponent (
@@ -279,8 +268,7 @@ export async function createPreviewDeployment(
279268 method : "POST" ,
280269 headers : { "Content-Type" : "application/json" } ,
281270 body : JSON . stringify ( request ) ,
282- } ,
283- queryParams
271+ }
284272 ) ;
285273}
286274
0 commit comments