Skip to content

Commit 59a4b12

Browse files
razor-xseambot
andauthored
fix: Pass clientOptions to all clients (#6)
* fix: Pass clientOptions to all clients * ci: Generate code --------- Co-authored-by: Seam Bot <[email protected]>
1 parent 6556c5a commit 59a4b12

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/use-seam-client.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ export function useSeamClient(): {
5555
if (client != null)
5656
return {
5757
client,
58-
endpointClient: SeamHttpEndpoints.fromClient(client.client),
58+
endpointClient: SeamHttpEndpoints.fromClient(
59+
client.client,
60+
clientOptions,
61+
),
5962
clientWithoutWorkspace: null,
6063
endpointClientWithoutWorkspace: null,
6164
}
@@ -68,7 +71,10 @@ export function useSeamClient(): {
6871

6972
return {
7073
client: seam,
71-
endpointClient: SeamHttpEndpoints.fromClient(seam.client),
74+
endpointClient: SeamHttpEndpoints.fromClient(
75+
seam.client,
76+
clientOptions,
77+
),
7278
clientWithoutWorkspace: null,
7379
endpointClientWithoutWorkspace: null,
7480
}
@@ -83,19 +89,26 @@ export function useSeamClient(): {
8389

8490
return {
8591
client: seam,
86-
endpointClient: SeamHttpEndpoints.fromClient(seam.client),
92+
endpointClient: SeamHttpEndpoints.fromClient(
93+
seam.client,
94+
clientOptions,
95+
),
8796
clientWithoutWorkspace: null,
8897
endpointClientWithoutWorkspace: null,
8998
}
9099
}
91100

92101
if (consoleSessionToken != null) {
93102
const clientWithoutWorkspace =
94-
SeamHttpWithoutWorkspace.fromConsoleSessionToken(consoleSessionToken)
103+
SeamHttpWithoutWorkspace.fromConsoleSessionToken(
104+
consoleSessionToken,
105+
clientOptions,
106+
)
95107

96108
const endpointClientWithoutWorkspace =
97109
SeamHttpEndpointsWithoutWorkspace.fromClient(
98110
clientWithoutWorkspace.client,
111+
clientOptions,
99112
)
100113

101114
if (workspaceId == null) {
@@ -115,7 +128,10 @@ export function useSeamClient(): {
115128

116129
return {
117130
client: seam,
118-
endpointClient: SeamHttpEndpoints.fromClient(seam.client),
131+
endpointClient: SeamHttpEndpoints.fromClient(
132+
seam.client,
133+
clientOptions,
134+
),
119135
clientWithoutWorkspace,
120136
endpointClientWithoutWorkspace,
121137
}

0 commit comments

Comments
 (0)