Skip to content

Commit cfd4859

Browse files
Revert some removed type definitions
1 parent 9a787a8 commit cfd4859

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

types/splitio.d.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,35 @@ declare namespace SplitIO {
655655
readonly type: string
656656
(params: {}): (Integration | void)
657657
}
658+
/**
659+
* A pair of user key and it's trafficType, required for tracking valid Split events.
660+
* @typedef {Object} Identity
661+
* @property {string} key The user key.
662+
* @property {string} trafficType The key traffic type.
663+
*/
664+
type Identity = {
665+
key: string;
666+
trafficType: string;
667+
};
668+
/**
669+
* Object with information about a Split event.
670+
* @typedef {Object} EventData
671+
*/
672+
type EventData = {
673+
eventTypeId: string;
674+
value?: number;
675+
properties?: Properties;
676+
trafficTypeName?: string;
677+
key?: string;
678+
timestamp?: number;
679+
};
680+
/**
681+
* Object representing the data sent by Split (events and impressions).
682+
* @typedef {Object} IntegrationData
683+
* @property {string} type The type of Split data, either 'IMPRESSION' or 'EVENT'.
684+
* @property {ImpressionData | EventData} payload The data instance itself.
685+
*/
686+
type IntegrationData = { type: 'IMPRESSION', payload: SplitIO.ImpressionData } | { type: 'EVENT', payload: SplitIO.EventData };
658687
/**
659688
* Available URL settings for the SDKs.
660689
*/

0 commit comments

Comments
 (0)