@mozaic-io/mozaic-sdk-node
Version:
The Mozaic Node SDK enables you to pay your creators easily via the Mozaic API.
46 lines • 2.57 kB
TypeScript
/**
* This is the main entry point for working with Payment Cycles.
* @group ResourcesGroup
* @category ResourcesCat
* @document ../../../documents/resources/PaymentCycles.md
*/
import { Mozaic } from "../..";
import { Configuration, ContactsApi, ContactStatusPersona } from "../../api";
import { BaseResource } from "../BaseResource";
import { Contact } from "./Contact";
import { ContactList } from "./ContactList";
export declare class Contacts extends BaseResource {
private _mozaic;
private _contactsApi;
/**
* @internal
* You should not call this constructor directly. Instead, use the Mozaic main
* entry point to get access to the SDK classes.
* @param configuration
*/
constructor(mozaic: Mozaic, configuration: Configuration);
/**
* Get the underlying API for direct calls to the Mozaic API.
*/
get ContactsApi(): ContactsApi;
/**
* Get a contact by external ID. If you have more than one contact with the same external ID,
* this will return the first contact that matches the external ID. Use getContacts to return all
* contacts with the same external ID.
* @param externalId The external ID of the contact to retrieve. This ID represents the user in an external system.
* @returns A contact that matches the external ID.
*/
getContactByExternalId(externalId: string): Promise<Contact>;
/**
* Searches for a contact using various search parameters. You must supply either a term or an external ID.
* @param limit The number of items to return per page. Must be between 1 and 100 inclusive.
* @param page The page number to return. Must be greater than 0.
* @param term The search term to use. This will search the known name (the name you gave the contact), first name, last name, external ID, and email address of the contact. This parameter is limited to 50 chars max.
* @param externalId The external ID of the contact to retrieve. This ID represents the user in an external system.
* @param sinceUTC The date and time to use as a filter. This will return all contacts that were created or updated after this date and time.
* @param contactStatus An array of contact statuses. Contacts with a status in this array will be returned.
* @returns A list of contacts that match the search criteria.
*/
getContacts(limit: number, page: number, term?: string, externalId?: string, sinceUTC?: string, contactStatus?: Array<ContactStatusPersona>): Promise<ContactList>;
}
//# sourceMappingURL=Contacts.d.ts.map