@rudderstack/integrations-lib
Version:
A comprehensive TypeScript library providing shared utilities, SDKs, and tools for RudderStack integrations and destinations.
24 lines • 1.33 kB
TypeScript
import { AuthObject, CreateSegmentBody, CreateSegmentResponse, GetSegmentsResponse, CustomerIOConfig } from './type';
import { BaseSDK } from '../common/base-sdk';
import { StatTags } from '../../network/clients/types';
export default class CustomerIOSegment extends BaseSDK<AuthObject, CustomerIOConfig> {
validateAuthObject(authObject: AuthObject): void;
protected buildRequestUrl(endpoint: string): string;
protected getHeaders(): Record<string, 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
* @param statTags - Optional stat tags for metrics and logging
* @returns
*/
getSegments(statTags?: StatTags): 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
* @param statTags - Optional stat tags for metrics and logging
* @returns
*/
createSegment(body: CreateSegmentBody, statTags?: StatTags): Promise<CreateSegmentResponse>;
}
//# sourceMappingURL=index.d.ts.map