Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Profile

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private Readonly store

store: Store

Methods

get

  • get(options?: { fields?: string }): Promise<Person>
  • Get the profile belonging to the provided user's access token.

    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      accessToken: jwt_user_token
    });
    const response = await client.user.profile.get();
    console.log(response);
    
    throws

    Response If the server returns a non-"OK" status, the whole response object will be thrown.

    Parameters

    • options: { fields?: string } = {}
      • Optional fields?: string

        Not all fields on the model are returned by default - you can request specific fields with a string that looks something like ',Account.'. Note: the shape of the returned object may not match the model in this library if this string does not start with '*' as shown.

    Returns Promise<Person>

    The response body.

update

  • Update the profile belonging to the provided user's uid and access token.

    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      accessToken: jwt_user_token
    });
    const response = await client.user.profile.update({
      Uid: 'DQ2DyknW',
      FirstName: 'Jane',
      LastName: 'Doe'
    });
    console.log(response);
    
    throws

    Response If the server returns a non-"OK" or non-"400" status, the whole response object will be thrown.

    Parameters

    • profile: ProfileUpdate

      The profile fields and values to update. Must include the user's uid.

    Returns Promise<Person | ValidationError<Person>>

    The response body if response status OK, or response body with validation errors if response status 400.

Generated using TypeDoc