import { APIResource } from "../../core/resource.mjs"; import * as Shared from "../shared.mjs"; import * as ActivitiesAPI from "./activities.mjs"; import { Activities, ActivityCreateParams } from "./activities.mjs"; import * as HighlightsAPI from "./highlights.mjs"; import { HighlightCreateParams, HighlightDeleteParams, HighlightUpdateParams, Highlights } from "./highlights.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { PagePromise, PylonCursorPage, type PylonCursorPageParams, PylonSearchPage, type PylonSearchPageParams } from "../../core/pagination.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class Accounts extends APIResource { activities: ActivitiesAPI.Activities; highlights: HighlightsAPI.Highlights; /** * Create an account */ create(body: AccountCreateParams, options?: RequestOptions): APIPromise; /** * Get an account by its ID or external ID */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * Update an account */ update(id: string, body: AccountUpdateParams, options?: RequestOptions): APIPromise; /** * List accounts */ list(query?: AccountListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Delete an account */ delete(id: string, options?: RequestOptions): APIPromise; /** * Search accounts */ search(body: AccountSearchParams, options?: RequestOptions): PagePromise; } export type AccountsPylonCursorPage = PylonCursorPage; export type AccountsPylonSearchPage = PylonSearchPage; export interface Account { id?: string; channels?: Array; created_at?: string; crm_settings?: Account.CRMSettings; custom_fields?: { [key: string]: Shared.CustomFieldValue; }; /** * @deprecated */ domain?: string; domains?: Array; external_ids?: Array; latest_customer_activity_time?: string; name?: string; owner?: UserReference; primary_domain?: string; tags?: Array; type?: string; } export declare namespace Account { interface CRMSettings { details?: Array; } namespace CRMSettings { interface Detail { id?: string; source?: string; } } } export interface AccountListResponse { data?: Array; pagination?: Pagination; request_id?: string; } export interface AccountResponse { data?: Account; request_id?: string; } export interface Channel { channel_id?: string; is_primary?: boolean; source?: string; } export interface CustomField { slug?: string; value?: string; values?: Array; } export interface ExternalID { external_id?: string; label?: string; } export interface Pagination { cursor?: string; has_next_page?: boolean; } export interface SearchRequest { /** * The cursor to use for pagination */ cursor?: string; filter?: Shared.Filter; /** * The number of items to fetch */ limit?: number; } export interface UserReference { id?: string; email?: string; } export interface AccountCreateParams { /** * The name of the account */ name: string; /** * An array of channels to be linked to this account */ channels?: Array; /** * An array of custom fields to be used on this account */ custom_fields?: Array; /** * @deprecated Deprecated. Use domains instead */ domain?: string; /** * Domains of the account. Must specify one domain as primary */ domains?: Array; /** * An array of external IDs to be used on this account */ external_ids?: Array; /** * The logo URL of the account */ logo_url?: string; /** * The primary domain of the account */ primary_domain?: string; /** * An array of tags to apply to this account */ tags?: Array; } export interface AccountUpdateParams { /** * An array of channels to be linked to this account */ channels?: Array; /** * An array of custom fields to be used on this account */ custom_fields?: Array; /** * Domains of the account. Must specify one domain as primary */ domains?: Array; /** * An array of external IDs to be used on this account */ external_ids?: Array; /** * The name of the account */ name?: string; /** * The ID of the owner of the account */ owner_id?: string; /** * The primary domain of the account */ primary_domain?: string; /** * An array of tags to apply to this account */ tags?: Array; } export interface AccountListParams extends PylonCursorPageParams { } export interface AccountSearchParams extends PylonSearchPageParams { } export declare namespace Accounts { export { type Account as Account, type AccountListResponse as AccountListResponse, type AccountResponse as AccountResponse, type Channel as Channel, type CustomField as CustomField, type ExternalID as ExternalID, type Pagination as Pagination, type SearchRequest as SearchRequest, type UserReference as UserReference, type AccountsPylonCursorPage as AccountsPylonCursorPage, type AccountsPylonSearchPage as AccountsPylonSearchPage, type AccountCreateParams as AccountCreateParams, type AccountUpdateParams as AccountUpdateParams, type AccountListParams as AccountListParams, type AccountSearchParams as AccountSearchParams, }; export { Activities as Activities, type ActivityCreateParams as ActivityCreateParams }; export { Highlights as Highlights, type HighlightCreateParams as HighlightCreateParams, type HighlightUpdateParams as HighlightUpdateParams, type HighlightDeleteParams as HighlightDeleteParams, }; } //# sourceMappingURL=accounts.d.mts.map