open-index/open-npm huggingface dataset:
npm package: @rudderstack/integrations-lib
Description: A comprehensive TypeScript library providing shared utilities, SDKs, and tools for RudderStack integrations and destinations.
Author: RudderStack
Latest version: 0.2.67

# RudderStack Integrations Library

A comprehensive TypeScript library providing shared utilities, SDKs, and tools for RudderStack integrations and destinations.

## Features

- **SDK Integrations**: Pre-built SDKs for Google Ads, Zoho, Customer.io, Criteo, and SFMC
- **Feature Flags**: Multi-provider feature flag system with Flagsmith and Local support
- **Network Utilities**: HTTP client factory and request handling
- **Error Handling**: Comprehensive error types and handling utilities
- **Logging**: Structured logging with multiple levels and formats
- **Cluster Management**: Process clustering and management utilities
- **Utilities**: Common utilities for data manipulation, validation, and processing

## Installation

```bash
npm install @rudderstack/integrations-lib
```

## Quick Start

```typescript
import {
  // Core utilities
  logger,
  structuredLogger,
  setValue,

  // SDKs
  SFMC,
  CustomerIOSegment,
  ZOHO_SDK,
  GoogleAdsSDK,
  CriteoAudience,

  // Feature flags
  featureFlagService,
  FeatureFlagService,

  // Network
  createHttpClient,

  // Utils
  deepFreeze,
  batchProcess,
} from '@rudderstack/integrations-lib';

// Initialize feature flags
await featureFlagService.initialize();

// Use SDKs
const sfmc = new SFMC(config);
const googleAds = new GoogleAdsSDK.GoogleAdsRestAPI(config);

// Structured logging
structuredLogger.info('Integration started', {
  destinationId: 'dest-123',
  workspaceId: 'ws-456',
});
```

## SDKs

- **SFMC**: Salesforce Marketing Cloud integration
- **Customer.io**: Customer.io audience management
- **Zoho**: Zoho CRM and marketing tools
- **Google Ads**: Google Ads REST API client
- **Criteo**: Criteo audience management

## Feature Flags

Multi-provider feature flag system supporting:

- Flagsmith for production
- Local provider for development
- Environment-based overrides
- Type-safe flag definitions

```typescript
const user = {
  workspaceId: 'ws-123',
  traits: new Map([
    ['organization_id', 'org-456'],
    ['user_id', 'user-789'],
  ]),
};

const result = await featureFlagService.isFeatureEnabled(user, 'my-feature');
```

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Test
npm test

# Lint
npm run lint
```

## License

MIT