A TypeScript library for managing third-party integrations in the Intelligems ecosystem. This package provides tools and utilities for seamless integration with various third-party services and platforms.
yarn add @intelligems/third-party-integrations
- Candy Rack Integration: Tools and utilities for integrating with the Candy Rack platform
- iFrame Messenger: Secure communication between parent and child iframes
- TypeScript Support: Full TypeScript support with type definitions
import { CandyRackToIntelligemsMessenger } from '@intelligems/third-party-integrations/candy-rack';
// Initialize the messenger from Candy Rack to Intelligems
const messenger = new CandyRackToIntelligemsMessenger(
'https://intelligems.io', // parent origin
(event) => {
// Handle messages from Intelligems
console.log('Received message:', event);
}
);
import { IntelligemsToCandyRackMessenger } from '@intelligems/third-party-integrations/candy-rack';
// Initialize the messenger from Intelligems to Candy Rack
const messenger = new IntelligemsToCandyRackMessenger(
'#candy-rack-iframe', // iframe selector
'https://candy-rack.com' // target origin
);
// Send a message to Candy Rack
messenger.postMessage({
type: 'INTELLIGEMS_TO_CANDY_RACK',
data: {
path: 'some.function.path',
payload: { /* your data */ }
}
});
import { IframeMessenger } from '@intelligems/third-party-integrations/core/iframe-messenger';
// Initialize the iframe messenger
const messenger = new IframeMessenger({
// configuration options
});i
- Node.js (Latest LTS version recommended)
- Yarn package manager
- Clone the repository
- Install dependencies:
yarn install
yarn dev
- Start development mode with watchyarn build:dev
- Build for developmentyarn build:prod
- Build for productionyarn deploy
- Deploy to CDN
src/
├── core/ # Core functionality and utilities
├── integrations/ # Third-party integration implementations
├── types/ # TypeScript type definitions
└── examples/ # Example implementations
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please contact the Intelligems team or open an issue in the repository.