diff --git a/packages/event-producer/README.md b/packages/event-producer/README.md index 2a248b4b..03ed80d1 100644 --- a/packages/event-producer/README.md +++ b/packages/event-producer/README.md @@ -39,7 +39,7 @@ Run `pnpm i` in the event-producer root folder. ## How to use ```typescript -import { init, dispatchEvent, bus } from '@tidal-music/event-producer'; +import { init, sendEvent, bus } from '@tidal-music/event-producer'; import { credentialsProvider } from './credentialsProvider'; @@ -76,8 +76,8 @@ async function main() { tlPublicConsumerUri: '/api/public/event-batch', }); - // Now we can dispatch events - dispatchEvent({ + // Now we can send events + sendEvent({ consentCategory: 'PERFORMANCE', name: 'listened_to_track', payload: { diff --git a/packages/event-producer/package.json b/packages/event-producer/package.json index ba67c0a2..ad702c76 100644 --- a/packages/event-producer/package.json +++ b/packages/event-producer/package.json @@ -1,6 +1,6 @@ { "name": "@tidal-music/event-producer", - "version": "1.2.0", + "version": "1.2.1", "type": "module", "files": [ "dist" diff --git a/packages/event-producer/src/types.ts b/packages/event-producer/src/types.ts index a6663aac..94ad70dc 100644 --- a/packages/event-producer/src/types.ts +++ b/packages/event-producer/src/types.ts @@ -34,8 +34,5 @@ export type EPEvent = Omit & { export type PlatformData = { browserName: string; browserVersion: string; - deviceVendor: string; - model: string; osName: string; - version: string; }; diff --git a/packages/event-producer/src/utils/headerUtils.test.ts b/packages/event-producer/src/utils/headerUtils.test.ts index 6b9dd601..5a78fdf7 100644 --- a/packages/event-producer/src/utils/headerUtils.test.ts +++ b/packages/event-producer/src/utils/headerUtils.test.ts @@ -25,10 +25,7 @@ describe('headerUtils', () => { 'browser-version': config.platform.browserVersion, 'client-id': 'fakeClientId', 'consent-category': 'NECESSARY', - 'device-model': config.platform.model, - 'device-vendor': config.platform.deviceVendor, 'os-name': config.platform.osName, - 'os-version': config.platform.version, 'requested-sent-timestamp': '2023', someXtraHeader: 'eggs', }); diff --git a/packages/event-producer/src/utils/headerUtils.ts b/packages/event-producer/src/utils/headerUtils.ts index 7999da47..964d7b4e 100644 --- a/packages/event-producer/src/utils/headerUtils.ts +++ b/packages/event-producer/src/utils/headerUtils.ts @@ -8,14 +8,7 @@ export const getEventHeaders = ({ authorize = true, consentCategory, credentials, - platformData: { - browserName, - browserVersion, - deviceVendor, - model, - osName, - version: osVersion, - }, + platformData: { browserName, browserVersion, osName }, sentTimestamp, suppliedHeaders, }: { @@ -37,10 +30,7 @@ export const getEventHeaders = ({ 'browser-version': browserVersion, 'client-id': clientId, 'consent-category': consentCategory, - 'device-model': model, - 'device-vendor': deviceVendor, 'os-name': osName, - 'os-version': osVersion, 'requested-sent-timestamp': sentTimestamp, }; diff --git a/packages/event-producer/test/fixtures/config.ts b/packages/event-producer/test/fixtures/config.ts index d27c0e1f..478085c6 100644 --- a/packages/event-producer/test/fixtures/config.ts +++ b/packages/event-producer/test/fixtures/config.ts @@ -13,10 +13,7 @@ export const config: Config = { platform: { browserName: 'brave', browserVersion: 'final.final.final', - deviceVendor: 'baconfari', - model: 'the XL', osName: 'Bic Mac', - version: '666', }, tlConsumerUri: '/api/event-batch', tlPublicConsumerUri: '/api/public/event-batch',