-
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
[ONL-8253] Added typings #73
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4c4c4cb
[ONL-8253] feat: Added typings.
mcibique 0959d05
[ONL-8253] chore: Stop building node v16.
mcibique a334e16
[ONL-8253] chore: Fixed default export.
mcibique a706fa3
3.5.0
mcibique bd575a9
[ONL-8253] pr: Addressed comments.
mcibique File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[*.{js,jsx,ts,tsx,vue,css,scss}] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
export enum HuhaTaskStatus { | ||
IN_PROGRESS = 'In progress', | ||
COMPLETED = 'Completed', | ||
ABANDONED = 'Abandoned', | ||
} | ||
|
||
export interface HuhaOptions { | ||
trackOnGoogleAnalytics?: boolean, | ||
trackOnIntercom?: boolean, | ||
trackOnSegment?: boolean, | ||
} | ||
|
||
export interface HuhaTaskProps { | ||
name: string, | ||
label?: string, | ||
category?: string, | ||
value?: string, | ||
parentTask?: HuhaTask | null, | ||
execId?: string, | ||
persistent?: boolean, | ||
} | ||
|
||
export class HuhaTask implements HuhaOptions { | ||
name: string; | ||
label?: string; | ||
category?: string; | ||
value?: string; | ||
status: HuhaTaskStatus; | ||
effort: number; | ||
errors: number; | ||
start: number; | ||
end?: number; | ||
execId: string; | ||
persistent: boolean; | ||
parentExecId?: string; | ||
parentTask?: HuhaTask | null; | ||
trackOnGoogleAnalytics?: boolean; | ||
trackOnIntercom?: boolean; | ||
trackOnSegment?: boolean; | ||
|
||
constructor(props: HuhaTaskProps, options: HuhaOptions); | ||
|
||
addInteraction(): void; | ||
addError(): void; | ||
finish(status: HuhaTaskStatus): void; | ||
complete(): void; | ||
abandon(): void; | ||
track(): void; | ||
|
||
get time(): number; | ||
|
||
sendToGoogleAnalytics(): void; | ||
sendToIntercom(): void; | ||
sendToSegment(): void; | ||
|
||
updateFromLocalStorage(): void; | ||
removeFromLocalStorage(): void; | ||
} | ||
|
||
export interface HuhaEventProps { | ||
name: string, | ||
object?: string, | ||
action?: string, | ||
category?: string, | ||
value?: string, | ||
task?: string | HuhaTask | null, | ||
eventGroup?: string, | ||
} | ||
|
||
export class HuhaEvent implements HuhaOptions { | ||
name: string; | ||
object?: string; | ||
action?: string; | ||
category?: string; | ||
value?: string; | ||
task?: string | HuhaTask | null; | ||
eventGroup?: string; | ||
trackOnGoogleAnalytics?: boolean; | ||
trackOnIntercom?: boolean; | ||
trackOnSegment?: boolean; | ||
|
||
constructor(props: HuhaEventProps, options: HuhaOptions); | ||
|
||
track(): void; | ||
sendToGoogleAnalytics(): void; | ||
sendToSegment(): void; | ||
} | ||
|
||
export default class Huha implements HuhaOptions { | ||
tasks: HuhaTask[]; | ||
events: HuhaEvent[]; | ||
|
||
trackOnGoogleAnalytics?: boolean; | ||
trackOnIntercom?: boolean; | ||
trackOnSegment?: boolean; | ||
|
||
constructor(options: HuhaOptions); | ||
|
||
createTask(properties: HuhaTaskProps): HuhaTask; | ||
createEvent(properties: HuhaEventProps): HuhaEvent; | ||
getTask(name: string): HuhaTask | null; | ||
|
||
setUpEvents(): void; | ||
registerEvent(capturedEvent: string, element: Element): void; | ||
|
||
abandonInProgressTasks(): void; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
we might have an error with the value type in a couple of files in EBO, it's mostly string, but we do have numbers in confirmation.vue.
I have asked the data team about these and they told me that for the quote rate (for which we are sending a number) they only check if the value exists, they don't do any calculations with them, so we could just convert them to strings, or we could add number to value type
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.
Okay, I have enabled numbers as value as well.