UNPKG

@rudderstack/integrations-lib

Version:
29 lines 1.24 kB
import { AuthObject, CreateSegmentBody, CreateSegmentResponse, GetSegmentsResponse } from './type'; import { AxiosClient } from '../../network/clients/axios_client'; export default class CustomerIOSegment { static readonly url: string; private static readonly DEFAULT_AXIOS_CLIENT; private axiosClient; private authObject; constructor(authObject: AuthObject, axiosClient?: AxiosClient); private static validateAuthObject; /** * This function returns the app api key. * @returns */ getAppApiKey(): string; /** * This method fetches the segments. If unable to fetch the segments, it returns a RestError. * ref: https://docs.customer.io/api/app/#operation/listSegments * @returns */ getSegments(): Promise<GetSegmentsResponse>; /** * This method creates a manual segment. It requires the segment body. The method returns the created segment. If the manual segment is not created, it returns a RestError. * ref: https://docs.customer.io/api/app/#operation/createManSegment * @param body CreateSegment fields * @returns */ createSegment(body: CreateSegmentBody): Promise<CreateSegmentResponse>; } //# sourceMappingURL=index.d.ts.map