Class: SupervisorsApi
Defined in: packages/sdk/src/api/supervisors.ts:18
Extends
Constructors
Constructor
new SupervisorsApi(
apiKey,baseUrl,customFetch?):SupervisorsApi
Defined in: packages/sdk/src/api/base.ts:184
Parameters
apiKey
string | undefined
baseUrl
string
customFetch?
{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
Returns
SupervisorsApi
Inherited from
Methods
createSupervisor()
createSupervisor(
wid,supervisor):Promise<CustomTool>
Defined in: packages/sdk/src/api/supervisors.ts:30
Create a new supervisor in a workspace.
Parameters
wid
string
supervisor
Returns
Promise<CustomTool>
deleteSupervisor()
deleteSupervisor(
wid,id):Promise<void>
Defined in: packages/sdk/src/api/supervisors.ts:50
Delete a supervisor by ID.
Parameters
wid
string
id
number
Returns
Promise<void>
getActingMember()
getActingMember():
string|undefined
Defined in: packages/sdk/src/api/base.ts:237
Get the current acting member UUID.
Returns
string | undefined
Inherited from
getSupervisor()
getSupervisor(
wid,id):Promise<CustomTool>
Defined in: packages/sdk/src/api/supervisors.ts:25
Get a single supervisor by ID.
Parameters
wid
string
id
number
Returns
Promise<CustomTool>
getSupervisors()
getSupervisors(
wid):Promise<CustomTool[]>
Defined in: packages/sdk/src/api/supervisors.ts:20
List all supervisors in a workspace.
Parameters
wid
string
Returns
Promise<CustomTool[]>
setActingMember()
setActingMember(
memberUuid):void
Defined in: packages/sdk/src/api/base.ts:230
Set the acting member UUID for member identity switching. When set, all API requests will include the X-Acting-Member header. The backend will validate that the authenticated account owns this member and use it as the effective identity for the request.
Parameters
memberUuid
string | undefined
Returns
void
Inherited from
setEnhancedAuthHandler()
setEnhancedAuthHandler(
handler):void
Defined in: packages/sdk/src/api/base.ts:204
Set the handler for enhanced authentication requirements (RFC 9470 Step-Up Auth). This handler is called when a 401 response includes WWW-Authenticate header with error="insufficient_user_authentication".
Parameters
handler
EnhancedAuthHandler | undefined
Returns
void
Inherited from
BaseApiClient.setEnhancedAuthHandler
setOrgAuthHandler()
setOrgAuthHandler(
handler):void
Defined in: packages/sdk/src/api/base.ts:213
Set the handler for organization authentication requirements. This handler is called when a 401 response includes WWW-Authenticate header with realm="org". The handler should redirect the user to complete org auth.
Parameters
handler
OrgAuthHandler | undefined
Returns
void
Inherited from
BaseApiClient.setOrgAuthHandler
setOrgSession()
setOrgSession(
session,orgUuid?):void
Defined in: packages/sdk/src/api/base.ts:251
Set the opaque org session credential for cross-domain requests. Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still use X-Org-Token through setOrgToken() during the migration window.
orgUuid is the org that issued the credential; passing it lets the 401
handler detect a stale session when a subsequent request targets a
different org and re-fire the org-auth handler instead of silently
401-ing. Callers without that context (legacy / unknown) may omit it.
Parameters
session
string | undefined
orgUuid?
string
Returns
void
Inherited from
setOrgToken()
setOrgToken(
token,orgUuid?):void
Defined in: packages/sdk/src/api/base.ts:260
Parameters
token
string | undefined
orgUuid?
string
Returns
void
Deprecated
Legacy compatibility for stateless orgToken JWE credentials. Prefer setOrgSession() for opaque org browser sessions.
Inherited from
updateApiKey()
updateApiKey(
newApiKey):void
Defined in: packages/sdk/src/api/base.ts:220
Update the API key (used after successful re-authentication).
Parameters
newApiKey
string
Returns
void
Inherited from
updateSupervisor()
updateSupervisor(
wid,id,supervisor):Promise<CustomTool>
Defined in: packages/sdk/src/api/supervisors.ts:38
Update an existing supervisor with partial data.
Parameters
wid
string
id
number
supervisor
Partial<SupervisorFormData>
Returns
Promise<CustomTool>