Skip to content

Commit

Permalink
Merge ad93044 into 4ee0ebd
Browse files Browse the repository at this point in the history
  • Loading branch information
swong1213 committed Aug 21, 2023
2 parents 4ee0ebd + ad93044 commit d795c77
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/AnalyticsEventsService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {AnalyticsConfig} from "./AnalyticsConfig";
import {EventAPIResponse, EventPayload} from "./models";

export interface AnalyticsEventService {

constructor(config: AnalyticsConfig);

/**
* Creates a new AnalyticsEventService with the following values defined
* as the default when making a report.
*
* @param payload - desired values to be applied. The new payload will
* override any overlapping values.
*/
with(payload: EventPayload): AnalyticsEventService;

/**
* Reports an analytics event. Operand will throw an error if the request
* fails. The request will be sent via Beacon API so that requests are
* non-blocking.
*
* @param payload - desired values to be applied. The new payload will
* override any overlapping values.
*/
report(payload: object): Promise<EventAPIResponse>;
};

0 comments on commit d795c77

Please sign in to comment.