UNPKG

hud-ai

Version:
62 lines (61 loc) 2.04 kB
/// <reference types="bluebird" /> import * as Promise from 'bluebird'; import { HudAiCreateAttributes, HudAiListAttributes, HudAiUpdateAttributes, Resource } from '../utils/Resource'; import { RequestManager } from '../RequestManager'; import { Person } from '../entities'; export interface PersonListAttributes extends HudAiListAttributes { companyId?: string; name?: string; title?: string; term?: string; twitterHandle?: string; sortBy?: string; personId?: string | string[]; } export interface PersonCreateAttributes extends HudAiCreateAttributes { companyId?: string; name: string; title: string; imageUrl?: string; linkedInUrl?: string; twitterHandle?: string; } export interface PersonUpdateAttributes extends HudAiUpdateAttributes { companyId?: string; name?: string; title?: string; imageUrl?: string; flag?: string; linkedInUrl?: string; twitterHandle?: string; } export interface PersonEmailLookupAttributes { firstName: string; lastName: string; companyId?: string; domain?: string; } export interface PersonLinkedinLookupAttributes { firstName: string; lastName: string; companyId: string; } export declare class PersonResource extends Resource<Person, PersonListAttributes, PersonCreateAttributes, PersonUpdateAttributes> { constructor(requestManager: RequestManager); list(listArgs: PersonListAttributes): Promise<{ count: number; rows: Person[]; }>; create(createArgs: PersonCreateAttributes): Promise<Person>; get(id: string | number): Promise<Person>; update(id: string | number, updateArgs: PersonUpdateAttributes): Promise<Person>; lookupEmail(lookupArgs: PersonEmailLookupAttributes): Promise<{ email: string | null; score: number; }>; lookupLinkedin(lookupArgs: PersonLinkedinLookupAttributes): Promise<{ url: string | null; }>; del(id: string | number): Promise<void>; destroy(id: string | number): Promise<void>; }