-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EventsSDK: create AnalyticsEventService #50
Conversation
Create AnalyticsEventsService interface. J=FUS-5868 TEST=auto
Create AnalyticsEventsService interface. J=FUS-5868 TEST=auto
Delete unused code and reorganize file structure for new version of the Analytics Events SDK. Update package.json J=FUS-5866 R=mtian, abenno TEST=auto Confirmed build succeeds with npm run build.
EventsSDK: Set up dev/unified-sdk
src/AnalyticsEventService.ts
Outdated
@@ -0,0 +1,23 @@ | |||
import {AnalyticsConfig} from "./AnalyticsConfig"; | |||
import {EventAPIResponse, EventPayload} from "./models"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might need to rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm rebasing adds all my previous commits to the list but I think I have to in order for the checks to pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm just gonna start over with a new PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closing this PR.
Create AnalyticsEventsService interface. J=FUS-5868 TEST=auto
Create AnalyticsEventsService interface. J=FUS-5868 TEST=auto
* @param payload - desired values to be applied. The new payload will | ||
* override any overlapping values. | ||
*/ | ||
report(payload: object): Promise<EventAPIResponse>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might misremembered this from sprint planning: Do we want EventAPIResponse with or without Promise? @mtian725
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alinayh you brought up a good point that I completely overlooked. Beacon doesnt return a promise. It just returns a boolean value but that boolean is whether or not the user agent is added to the request information successfully. It will still throw an error if the request fails, but we have no way to get the response body.
I discussed this with Ajay last night and we discuss how we might want to go about this because fetch with the keepalive flag is functionally equivalent, but firefox does not support this feature.
Create AnalyticsEventService interface that will be implemented by AnalyticsEventReporter
J=FUS-5868
TEST=auto