Skip to content

Commit 95eefea

Browse files
committed
Add some TODO notes
1 parent 8decfeb commit 95eefea

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

src/lib/seam/connect/client-options.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@ export class InvalidSeamHttpOptionsError extends Error {
5353
Error.captureStackTrace(this, this.constructor)
5454
}
5555
}
56+
57+
// TODO: withSessionToken { sessionToken } or withMultiWorkspaceApiKey { apiKey }?
58+
// export interface SeamHttpOptionsWithSessionToken extends SeamHttpCommonOptions {
59+
// workspaceId: string
60+
// apiKey: string
61+
// }

src/lib/seam/connect/client.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ export class SeamHttp {
2121
: apiKeyOrOptions,
2222
)
2323

24+
// TODO: axiosRetry? Allow options to configure this if so
2425
this.client = axios.create({
2526
baseURL: options.endpoint,
27+
withCredentials: isSeamHttpOptionsWithClientSessionToken(options),
2628
...options.axiosOptions,
2729
headers: {
2830
...getAuthHeaders(options),
2931
...options.axiosOptions.headers,
32+
// TODO: User-Agent
3033
},
3134
})
3235
}
@@ -56,6 +59,13 @@ export class SeamHttp {
5659
return new SeamHttp(opts)
5760
}
5861

62+
// TODO
63+
// static fromPublishableKey and deprecate getClientSessionToken
64+
65+
// TODO: Should we keep makeRequest?
66+
// Better to implement error handling and wrapping in an error handler.
67+
// makeRequest
68+
5969
get workspaces(): Workspaces {
6070
return new Workspaces(this.client)
6171
}

src/lib/seam/connect/routes/workspaces.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
// TODO: This file is generated from route spec
12
import type { Routes } from '@seamapi/types/connect'
23
import type { Axios } from 'axios'
34
import type { SetNonNullable } from 'type-fest'
4-
// import type { Workspace } from @seamapi/types
55

66
export class Workspaces {
77
#client: Axios
@@ -29,6 +29,7 @@ export type WorkspacesGetResponse = SetNonNullable<
2929
>
3030

3131
// UPSTREAM: Should come from @seamapi/types/connect
32+
// import type { Workspace } from @seamapi/types
3233
// export type { Workspace } from '@seamapi/types/connect'
3334
export interface Workspace {
3435
workspace_id: string

0 commit comments

Comments
 (0)