import * as Options from '../options'; import { BaseService } from '../infrastructure'; import { Customer, CustomerInvite, MetaField, MetaFieldUpdateCreate } from '../interfaces'; export declare class Customers extends BaseService { constructor(shopDomain: string, accessToken: string); /** * Get a count of all customers */ count(): Promise; /** * Get a list of all customers * @param options Options for filtering the results. */ list(options?: Options.DateOptions & Options.FieldOptions & Options.ListOptions): Promise; /** * Searches for customers that match a supplied query. * @param options Options for searching customers */ search(options?: Options.CustomerSearchOptions & Options.FieldOptions & Options.BasicListOptions): Promise; /** * Get a single customer * @param id The customer's id. * @param options Options for filtering the results. */ get(id: number, options?: Options.FieldOptions): Promise; /** * Creates a customer. * @param customer The customer being created. * @param options Options for creating the customer. */ create(customer: Partial): Promise; /** * Updates a customer with the given id. * @param id The customer's id. * @param customer The updated customer. */ update(id: number, customer: Partial): Promise; /** * Deletes a customer with the given id. * @param id The customer's id. */ delete(id: number): Promise; /** * Generate an account activation URL for a customer whose account is not yet enabled * @param id The customer's ids */ createActivationUrl(id: number): Promise; /** * Sends an account invite to a customer. * @param invite Optional invitation to send */ invite(invite?: CustomerInvite): Promise; /** * Gets a list of up to 250 metafields from the given customer. * @param id The customer's id. * @param options Options for filtering the results. */ listMetafields(customerId: number, options?: Options.MetafieldListOptions): Promise[]>; /** * Returns the number of metafields belonging to the given customer. * @param id The customer's id. */ countMetafields(customerId: number): Promise; /** * Gets the metafield with the given id from an customer. * @param customerId The customer's id. * @param id The metafield's id. */ getMetafield(customerId: number, id: number): Promise>; /** * Creates a metafield for the given customer. * @param customerId The customer's id. * @param id The metafield's id. * @param metafield Options for the metafield */ createMetafield(customerId: number, metafield: Partial): Promise>; /** * Updates a metafield for the given customer * @param customerId The customer's id. * @param id The metafield's id. * @param metafield Options for the metafield */ updateMetafield(customerId: number, id: number, metafield?: Partial): Promise>; /** * Deletes the metafield with the given id from an customer. * @param customerId The customer's id. * @param id The metafield's id. */ deleteMetafield(customerId: number, id: number): Promise; } export default Customers;