UNPKG

intercom-client

Version:

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fintercom%2Fintercom-node) [![npm shield](ht

63 lines (62 loc) 2.56 kB
/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Intercom from "../../../index"; export declare namespace Segments { interface Options { environment?: core.Supplier<environments.IntercomEnvironment | string>; token?: core.Supplier<core.BearerToken | undefined>; /** Override the Intercom-Version header */ version?: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "2.0" | "2.1" | "2.2" | "2.3" | "2.4" | "2.5" | "2.6" | "2.7" | "2.8" | "2.9" | "2.10" | "2.11" | "Unstable"; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional headers to include in the request. */ headers?: Record<string, string>; /** Override the Intercom-Version header */ version?: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "2.0" | "2.1" | "2.2" | "2.3" | "2.4" | "2.5" | "2.6" | "2.7" | "2.8" | "2.9" | "2.10" | "2.11" | "Unstable"; } } /** * Everything about your Segments */ export declare class Segments { protected readonly _options: Segments.Options; constructor(_options?: Segments.Options); /** * You can fetch a list of all segments. * * @param {Intercom.ListSegmentsRequest} request * @param {Segments.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * * @example * await client.segments.list() */ list(request?: Intercom.ListSegmentsRequest, requestOptions?: Segments.RequestOptions): Promise<Intercom.SegmentList>; /** * You can fetch the details of a single segment. * * @param {Intercom.FindSegmentRequest} request * @param {Segments.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.segments.find({ * segment_id: "123" * }) */ find(request: Intercom.FindSegmentRequest, requestOptions?: Segments.RequestOptions): Promise<Intercom.Segment>; protected _getAuthorizationHeader(): Promise<string>; }