Skip to content

Commit 58f702b

Browse files
chore(internal): codegen related update (#122)
1 parent b3315e0 commit 58f702b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ export interface ClientOptions {
4545
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
4646
* much longer than this timeout before the promise succeeds or fails.
4747
*/
48-
timeout?: number;
48+
timeout?: number | undefined;
4949

5050
/**
5151
* An HTTP agent used to manage HTTP(S) connections.
5252
*
5353
* If not provided, an agent will be constructed by default in the Node.js environment,
5454
* otherwise no agent is used.
5555
*/
56-
httpAgent?: Agent;
56+
httpAgent?: Agent | undefined;
5757

5858
/**
5959
* Specify a custom `fetch` function implementation.
@@ -69,23 +69,23 @@ export interface ClientOptions {
6969
*
7070
* @default 2
7171
*/
72-
maxRetries?: number;
72+
maxRetries?: number | undefined;
7373

7474
/**
7575
* Default headers to include with every request to the API.
7676
*
7777
* These can be removed in individual requests by explicitly setting the
7878
* header to `undefined` or `null` in request options.
7979
*/
80-
defaultHeaders?: Core.Headers;
80+
defaultHeaders?: Core.Headers | undefined;
8181

8282
/**
8383
* Default query parameters to include with every request to the API.
8484
*
8585
* These can be removed in individual requests by explicitly setting the
8686
* param to `undefined` in request options.
8787
*/
88-
defaultQuery?: Core.DefaultQuery;
88+
defaultQuery?: Core.DefaultQuery | undefined;
8989
}
9090

9191
/**

src/resources/sessions/downloads.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export class Downloads extends APIResource {
99
* Session Downloads
1010
*/
1111
list(id: string, options?: Core.RequestOptions): Core.APIPromise<Response> {
12-
return this._client.get(`/v1/sessions/${id}/downloads`, { ...options, __binaryResponse: true });
12+
return this._client.get(`/v1/sessions/${id}/downloads`, {
13+
...options,
14+
headers: { Accept: 'application/zip', ...options?.headers },
15+
__binaryResponse: true,
16+
});
1317
}
1418
}

0 commit comments

Comments
 (0)