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
5 changes: 4 additions & 1 deletion sdks/typescript/pmxt/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,10 @@ export interface EventMatchResult extends Readonly<UnifiedEvent> {
marketMatches: MatchResult[];
}

export type MatchedClusterSort = 'volume' | 'confidence';
/** Canonical cluster sort literal shared with the Python SDK. */
export type ClusterSortOption = 'volume' | 'confidence';

export type MatchedClusterSort = ClusterSortOption;

/** Shared filters for matched market/event cluster discovery. */
export interface MatchedClusterFilterParams {
Expand Down
9 changes: 9 additions & 0 deletions sdks/typescript/tests/public-exports.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import * as pmxt from '../index';
import { FeedClient as DirectFeedClient } from '../pmxt/feed-client';
import type { ClusterSortOption, MatchedClusterSort } from '../index';

const acceptsClusterSortOption = (sort: ClusterSortOption): MatchedClusterSort => sort;

describe('public exports', () => {
it('exports FeedClient as a top-level named export', () => {
Expand All @@ -16,4 +19,10 @@ describe('public exports', () => {
const client = new pmxt.FeedClient('chainlink');
expect(client).toBeInstanceOf(DirectFeedClient);
});

it('exports ClusterSortOption as a public type alias matching MatchedClusterSort', () => {
const byVolume = acceptsClusterSortOption('volume');
const byConfidence = acceptsClusterSortOption('confidence');
expect([byVolume, byConfidence]).toEqual(['volume', 'confidence']);
});
});
Loading