File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -53,3 +53,9 @@ export class InvalidSeamHttpOptionsError extends Error {
53
53
Error . captureStackTrace ( this , this . constructor )
54
54
}
55
55
}
56
+
57
+ // TODO: withSessionToken { sessionToken } or withMultiWorkspaceApiKey { apiKey }?
58
+ // export interface SeamHttpOptionsWithSessionToken extends SeamHttpCommonOptions {
59
+ // workspaceId: string
60
+ // apiKey: string
61
+ // }
Original file line number Diff line number Diff line change @@ -21,12 +21,15 @@ export class SeamHttp {
21
21
: apiKeyOrOptions ,
22
22
)
23
23
24
+ // TODO: axiosRetry? Allow options to configure this if so
24
25
this . client = axios . create ( {
25
26
baseURL : options . endpoint ,
27
+ withCredentials : isSeamHttpOptionsWithClientSessionToken ( options ) ,
26
28
...options . axiosOptions ,
27
29
headers : {
28
30
...getAuthHeaders ( options ) ,
29
31
...options . axiosOptions . headers ,
32
+ // TODO: User-Agent
30
33
} ,
31
34
} )
32
35
}
@@ -56,6 +59,13 @@ export class SeamHttp {
56
59
return new SeamHttp ( opts )
57
60
}
58
61
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
+
59
69
get workspaces ( ) : Workspaces {
60
70
return new Workspaces ( this . client )
61
71
}
Original file line number Diff line number Diff line change
1
+ // TODO: This file is generated from route spec
1
2
import type { Routes } from '@seamapi/types/connect'
2
3
import type { Axios } from 'axios'
3
4
import type { SetNonNullable } from 'type-fest'
4
- // import type { Workspace } from @seamapi /types
5
5
6
6
export class Workspaces {
7
7
#client: Axios
@@ -29,6 +29,7 @@ export type WorkspacesGetResponse = SetNonNullable<
29
29
>
30
30
31
31
// UPSTREAM: Should come from @seamapi /types/connect
32
+ // import type { Workspace } from @seamapi /types
32
33
// export type { Workspace } from '@seamapi/types/connect'
33
34
export interface Workspace {
34
35
workspace_id : string
You can’t perform that action at this time.
0 commit comments