Light Logo
JavaScript SDK (v0.56.0)Reference

AuthenticatedUser

Resource for operations related to the authenticated user.

Class: AuthenticatedUser

Resource for operations related to the authenticated user.

Extends

Constructors

Constructor

new AuthenticatedUser(api): AuthenticatedUser

Create a new resource.

Parameters

api

API

API client instance used to communicate with WriftAI's API.

Returns

AuthenticatedUser

Inherited from

Resource.constructor

Methods

get()

get(options?): Promise<UserWithDetails>

Get the authenticated user.

Parameters

options?

CallOptions

Options for the call.

Returns

Promise<UserWithDetails>

The user object.


models()

models(options?): Promise<PaginatedResponse<Model>>

List models of the authenticated user.

Parameters

options?

ListOptions

Options for listing models.

Returns

Promise<PaginatedResponse<Model>>

A paginated response containing models and navigation metadata.


update()

update(params): Promise<UserWithDetails>

Update the authenticated user.

Parameters

params

UpdateUserParams

Parameters for updating the user.

Returns

Promise<UserWithDetails>

The updated user object.