-
Notifications
You must be signed in to change notification settings - Fork 61
[MOBILE-4239] Fix Airship Actions running #557
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
Changes from 5 commits
45c071b
7cc69e7
46bd345
0c99f9c
bfe9572
8865254
fbdb400
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ export class CustomEvent { | |
_value?: number; | ||
_properties: JsonObject; | ||
_transactionId?: string; | ||
_interactionId?: string; | ||
_interactionType?: string; | ||
|
||
/** | ||
* Custom event constructor. | ||
|
@@ -39,6 +41,34 @@ export class CustomEvent { | |
this._transactionId = value; | ||
} | ||
|
||
/** | ||
* Gets the event's interaction ID. | ||
*/ | ||
get interactionId(): string | undefined { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need these changes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not particularly, I noticed we handle those in the proxy so I just added them |
||
return this._interactionId; | ||
} | ||
|
||
/** | ||
* Sets the event's interaction ID. | ||
*/ | ||
set interactionId(value: string | undefined) { | ||
this._interactionId = value; | ||
} | ||
|
||
/** | ||
* Gets the event's interaction Type. | ||
*/ | ||
get interactionType(): string | undefined { | ||
return this._interactionType; | ||
} | ||
|
||
/** | ||
* Sets the event's interaction Type. | ||
*/ | ||
set interactionType(value: string | undefined) { | ||
this._interactionType = value; | ||
} | ||
|
||
/** | ||
* Adds a property to the custom event. | ||
* | ||
|
@@ -48,4 +78,28 @@ export class CustomEvent { | |
addProperty(name: string, value: JsonValue) { | ||
this._properties[name] = value; | ||
} | ||
|
||
/** | ||
* Converts a CustomEvent into a JsonValue. | ||
* | ||
* @returns A JsonValue. | ||
*/ | ||
toJsonValue(): JsonValue { | ||
let jsonObject: JsonObject = {}; | ||
jsonObject.eventName = this._name; | ||
if (this._value) { | ||
jsonObject.eventValue = this._value; | ||
} | ||
jsonObject.properties = this._properties; | ||
if (this._transactionId) { | ||
jsonObject.transactionId = this._transactionId; | ||
} | ||
if (this._interactionId) { | ||
jsonObject.interactionId = this._interactionId; | ||
} | ||
if (this._interactionType) { | ||
jsonObject.interactionType = this._interactionType; | ||
} | ||
return jsonObject; | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.