@cdp-forge/types
v1.24.0
Published
TypeScript types for @cdp-forge
Readme
@cdp-forge/types
TypeScript type definitions for the CDP Forge Plugin Pipeline SDK.
📦 Installation
npm install @cdp-forge/types🚀 Usage
import {
Log,
Product,
GoogleTopic,
ConfigMessage,
Config
} from '@cdp-forge/types';
// Use the types in your plugin
const log: Log = {
client: 1,
date: "2024-01-01T00:00:00Z",
device: {
id: "device-123"
},
event: "page_view",
instance: 1,
page: {
title: "Homepage"
},
session: "session-123"
};
// Type your configuration
const config: Config = {
pulsar: {
proxy: 'pulsar://cdp-forge-pulsar-proxy:6650',
uiPassword: '',
dbPassword: ''
},
pipelinemanager: {
url: 'http://cdp-forge-core-pipeline-manager',
config_topic: 'config',
first_topic: 'logs'
},
mysql: {
uri: 'mysql://user:password@my-server-ip:3306'
},
opensearch: {
url: 'https://opensearch-cluster-master:9200',
username: 'admin',
password: ''
},
plugin: {
name: 'myPlugin',
priority: 1,
type: 'blocking'
}
};📋 Available Types
Core Types
Log- Main log object structureProduct- Product informationGoogleTopic- Google topics dataConfigMessage- Configuration messagesConfig- Complete configuration structure
Google Topics
GoogleTopicsMap- Map of Google topics with their names
🔗 Related
- @cdp-forge/core - Main CDP Forge package
📄 License
Proprietary. All rights reserved. See the LICENSE file for details.
