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 {
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+ // }
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 1+ // TODO: This file is generated from route spec
12import type { Routes } from '@seamapi/types/connect'
23import type { Axios } from 'axios'
34import type { SetNonNullable } from 'type-fest'
4- // import type { Workspace } from @seamapi /types
55
66export 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'
3334export interface Workspace {
3435 workspace_id : string
You can’t perform that action at this time.
0 commit comments