Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/mcp-provider-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export {
type Services,
type TelemetryService,
type TelemetryEvent,
type PdpEvent,
type OrgService,
type ConfigService,
type StartupFlags
Expand Down
8 changes: 8 additions & 0 deletions packages/mcp-provider-api/src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@ export interface Services {

export interface TelemetryService {
sendEvent(eventName: string, event: TelemetryEvent): void;
sendPdpEvent(event: PdpEvent): void;
}

export type TelemetryEvent = {
[key: string]: string | number | boolean | null | undefined;
};

export type PdpEvent = {
eventName: `${string}.${string}`;
productFeatureId: `aJC${string}`;
componentId?: string;
eventVolume?: number;
};


export interface OrgService {
getAllowedOrgUsernames(): Promise<Set<string>>;
Expand Down
5 changes: 5 additions & 0 deletions packages/mcp/src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
Services as IServices,
TelemetryService,
TelemetryEvent,
PdpEvent,
OrgService,
SanitizedOrgAuthorization,
ConfigService,
Expand Down Expand Up @@ -70,4 +71,8 @@ class NoopTelemetryService implements TelemetryService {
public sendEvent(_eventName: string, _event: TelemetryEvent): void {
// no-op
}

public sendPdpEvent(_event: PdpEvent): void {
// no-op
}
}
Loading