Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • People

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private Readonly store

store: Store

Methods

add

  • Add a person to the CRM. Must include an email address.

    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      apiKey: example_key,
      secretKey: example_secret
    });
    const response = await client.crm.people.add({
      Email: 'hello@tiltcamp.com'
    });
    console.log(response);
    
    throws

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

    Parameters

    • person: PersonAdd

      The details for the person to add.

    Returns Promise<Person | ValidationError<Person>>

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

delete

  • delete(uid: string): Promise<null>
  • Delete a specific person in the Outseta CRM by their uid.

    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      apiKey: example_key,
      secretKey: example_secret
    });
    const response = await client.crm.people.delete(uid);
    console.log(response);
    
    throws

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

    Parameters

    • uid: string

      The uid for the person to delete.

    Returns Promise<null>

    Null if deletion was successful.

get

  • get(uid: string): Promise<Person>
  • Get a specific person in the Outseta CRM by their uid.

    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      apiKey: example_key,
      secretKey: example_secret
    });
    const response = await client.crm.people.get(uid);
    console.log(response);
    
    throws

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

    Parameters

    • uid: string

      The uid for the person to get.

    Returns Promise<Person>

    The response body if response status OK.

getAll

  • getAll(options?: { limit?: number; offset?: number }): Promise<List<Person>>
  • Get all people in the Outseta CRM.

    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      apiKey: example_key,
      secretKey: example_secret
    });
    const response = await client.crm.people.getAll();
    console.log(response);
    
    throws

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

    Parameters

    • options: { limit?: number; offset?: number } = {}
      • Optional limit?: number

        The number of results returned by the API.

      • Optional offset?: number

        For pagination; returns (limit) results after this value.

    Returns Promise<List<Person>>

    The response body if response status OK.

update

  • Update a person in the CRM. Must include their uid.

    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      apiKey: example_key,
      secretKey: example_secret
    });
    const response = await client.crm.people.update({
      Uid: 'DQ2DyknW',
      Email: 'hello@tiltcamp.com'
    });
    console.log(response);
    
    throws

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

    Parameters

    • person: PersonUpdate

      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