npm package: @hybr1d/integrations-common
Description: A repository that consists of all the common code related to integrations that is shared across different environments
Latest version: 2.11.0

# @hybr1d/integrations-common

A repository that consists of all the common code related to integrations that is shared across different environments.

## Table of Contents
1. [Installation](#installation)
2. [Usage](#usage)
3. [Features](#features)
4. [Configuration](#configuration)
5. [Contributing](#contributing)
6. [Deployment](#deployment)

## Installation

This package can be installed using npm:

```bash
npm install @hybr1d/integrations-common
```

### Local Development Setup

1. Clone the repository:
```bash
git clone [repository-url]
cd integrations-common
```

2. Install dependencies:
```bash
npm install
```

3. Create a `.env` file in the root directory (see [Configuration](#configuration) section for required variables)

4. Build the project:
```bash
npm run build
```

## Usage

### Development Mode
To run the project in development mode with hot reloading:
```bash
npm run dev
```

### Production Mode
To run the project in production mode:
```bash
npm run build
npm start
```

### Library Usage
When using this package as a dependency in other projects:

```typescript
import { SomeIntegration } from '@hybr1d/integrations-common';

// Example usage
const integration = new SomeIntegration(config);
```

## Features

- Common integration patterns and utilities
- Shared TypeScript types and interfaces
- Integrated AWS SDK support
- HTTP client with Axios
- Cryptography utilities (crypto-js and cryptr)
- MongoDB integration
- Promise utilities with Bluebird
- Logging with Pino
- Date/time manipulation with Moment.js
- Query string handling with qs

## Configuration

The following environment variables are required to run the project:

```env
# AWS Configuration
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=

# MongoDB Configuration
MONGODB_URI=

# Application Configuration
NODE_ENV=development
LOG_LEVEL=info

# Add other required environment variables
```

Contact the development team to obtain the necessary credentials and configuration values.

## Contributing

### Development Workflow

1. Create a new branch from `main`:
```bash
git checkout -b feature/your-feature-name
```

2. Make your changes and ensure they follow the project's coding standards:
   - Use TypeScript for all new files
   - Follow the existing project structure
   - Add appropriate tests for new features
   - Update documentation as needed

3. Build and test your changes:
```bash
npm run build
```

4. Commit your changes using conventional commit messages:
```bash
git commit -m "feat: add new integration feature"
```

5. Push your changes and create a pull request:
```bash
git push origin feature/your-feature-name
```

### Publishing

To publish a new version:

1. Update the version in `package.json`
2. Run the build:
```bash
npm run build
```
3. Publish to npm:
```bash
npm publish
```

## Deployment

This package is published to npm and can be deployed using the following steps:

1. Ensure all tests pass and the build is successful
2. Update the version number in `package.json`
3. Run the prepublish script:
```bash
npm run prepublish
```
4. Publish to npm:
```bash
npm publish
```

### Version Control

This project follows semantic versioning (MAJOR.MINOR.PATCH). Current version: 2.10.2

### Dependencies

Key dependencies include:
- aws-sdk (^2.1445.0) - AWS SDK for Node.js
- axios (^1.5.0) - HTTP client
- mongodb (^5.8.1) - MongoDB driver
- typescript (^4.9.5) - TypeScript compiler
- Other utilities: bluebird, crypto-js, cryptr, moment, pino, qs

For the complete list of dependencies, refer to the `package.json` file.