import { APIResource } from "../core/resource.js"; import * as Shared from "./shared.js"; import * as AccountsAPI from "./accounts/accounts.js"; import { APIPromise } from "../core/api-promise.js"; import { PagePromise, PylonSearchPage, type PylonSearchPageParams } from "../core/pagination.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class Contacts extends APIResource { /** * Create a contact */ create(body: ContactCreateParams, options?: RequestOptions): APIPromise; /** * Get a contact by its ID */ retrieve(id: string, query: ContactRetrieveParams, options?: RequestOptions): APIPromise; /** * Update a contact */ update(id: string, body: ContactUpdateParams, options?: RequestOptions): APIPromise; /** * Search contacts */ search(body: ContactSearchParams, options?: RequestOptions): PagePromise; } export type ContactsPylonSearchPage = PylonSearchPage; export interface Contact { id?: string; account?: Contact.Account; avatar_url?: string; custom_fields?: { [key: string]: Shared.CustomFieldValue; }; email?: string; emails?: Array; name?: string; portal_role?: 'no_access' | 'viewer' | 'editor'; } export declare namespace Contact { interface Account { id?: string; } } export interface ContactResponse { data?: Contact; request_id?: string; } export interface ContactCreateParams { /** * The email of the contact */ email: string; /** * The account that this contact belongs to */ account_id?: string; /** * The avatar URL of the contact. Must be a square .png, .jpg or .jpeg */ avatar_url?: string; /** * An array of custom fields to be applied to this contact */ custom_fields?: Array; /** * The name of the contact */ name?: string; /** * The portal role to assign to the contact */ portal_role?: 'no_access' | 'viewer' | 'editor'; } export interface ContactRetrieveParams { /** * The number of contacts to fetch */ limit: number; /** * The cursor to use for pagination */ cursor?: string; } export interface ContactUpdateParams { /** * The account to move the contact to */ account_id?: string; /** * The avatar URL of the contact. Must be a square .png, .jpg or .jpeg */ avatar_url?: string; /** * An array of custom fields to be applied to this contact */ custom_fields?: Array; /** * The email of the contact */ email?: string; /** * The name of the contact */ name?: string; /** * The portal role to assign to the contact */ portal_role?: 'no_access' | 'viewer' | 'editor'; } export interface ContactSearchParams extends PylonSearchPageParams { } export declare namespace Contacts { export { type Contact as Contact, type ContactResponse as ContactResponse, type ContactsPylonSearchPage as ContactsPylonSearchPage, type ContactCreateParams as ContactCreateParams, type ContactRetrieveParams as ContactRetrieveParams, type ContactUpdateParams as ContactUpdateParams, type ContactSearchParams as ContactSearchParams, }; } //# sourceMappingURL=contacts.d.ts.map