Builder
export class PageViewContext {
    public productDetail(instanceKey: string, data: { profileKey: string, productKey: string }): any {
        request(options.endpoint + '/api/pageview/', [{ key: 'Instance-Key', value: instanceKey }], data);
    }
}
export class FacetClickContext {
    public post(instanceKey: string, data: { facet: string, value: string, context: { filterTemplateId?: number, categoryPath: string, page: string, domain: string } }) {
        request(options.endpoint + '/api/events/facetclick/', [{ key: 'Instance-Key', value: instanceKey }], data);
    }
}
export class PurchaseContext {
    public post(instanceKey: string, data: { profileKey: string, productKeys: string[] }) {
        request(options.endpoint + '/api/purchase/', [{ key: 'Instance-Key', value: instanceKey }], data);
    }
}
export class SearchContext {
    public post(instanceKey: string, data: { profileKey: string, searchTerm: string }) {
        request(options.endpoint + '/api/search/', [{ key: 'Instance-Key', value: instanceKey }], data);
    }
}


Has reading the relevant articles not helped you?