Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Activities

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private Readonly store

store: Store

Static Readonly DEFAULT_FIELDS

DEFAULT_FIELDS: string = ...

Methods

add

  • Record activity to an entity.

    import { EntityType } from 'outseta-api-client/dist/models/shared/entity-type';
    
    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      apiKey: example_key,
      secretKey: example_secret
    });
    const response = await client.crm.activities.add({
      EntityType: EntityType.Account,
      EntityUid: 'jW7GJVWq',
      Title: 'Example custom activity',
      Description: 'Added a new custom activity'
    });
    console.log(response);
    
    throws

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

    Parameters

    • activity: ActivityAdd

      The activity to log to Outseta.

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

        Not all fields on the model are returned by default - you can request specific fields with a that looks something like ',(field name here).(child field name here or * for all)'. 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<ValidationError<null> | Activity>

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

getAll

  • getAll(options?: { ActivityType?: ActivityType; EntityType?: EntityType; EntityUid?: string; fields?: string; limit?: number; offset?: number }): Promise<List<Activity>>
  • Get all activity:

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

    Get all activities for a particular account:

    import { EntityType } from 'outseta-api-client/dist/models/shared/entity-type';
    
    const client = new OutsetaApiClient({
      subdomain: 'test-company',
      apiKey: example_key,
      secretKey: example_secret
    });
    const account = {
      Uid: 'jW7GJVWq'
    };
    const response = await client.crm.activities.getAll({
      EntityType: EntityType.Account,
      EntityUid: account.Uid
    });
    console.log(response);
    
    throws

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

    Parameters

    • options: { ActivityType?: ActivityType; EntityType?: EntityType; EntityUid?: string; fields?: string; limit?: number; offset?: number } = {}
      • Optional ActivityType?: ActivityType

        Filter by activity type.

      • Optional EntityType?: EntityType

        Filter by entity type.

      • Optional EntityUid?: string

        Filter by uid - should be used in conjunction with the EntityType filter.

      • Optional fields?: string

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

      • 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<Activity>>

    The response body if response status OK.

Generated using TypeDoc