-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): pull release/v1.68.0 into main (#3415)
- Loading branch information
Showing
79 changed files
with
10,012 additions
and
15,621 deletions.
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 |
---|---|---|
|
@@ -38,6 +38,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 1 | ||
|
||
- name: Setup Docker Buildx | ||
|
@@ -88,6 +89,7 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 1 | ||
|
||
- name: Setup Docker Buildx | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,39 @@ | ||
const { getMappingConfig } = require('../../../../v0/util'); | ||
|
||
/** | ||
* ref :- https://developers.koddi.com/reference/winning-ads | ||
* impressions - https://developers.koddi.com/reference/impressions-1 | ||
* clicks - https://developers.koddi.com/reference/clicks-1 | ||
* conversions - https://developers.koddi.com/reference/conversions-1 | ||
*/ | ||
const EVENT_TYPES = { | ||
IMPRESSIONS: 'impressions', | ||
CLICKS: 'clicks', | ||
CONVERSIONS: 'conversions', | ||
}; | ||
|
||
const CONFIG_CATEGORIES = { | ||
IMPRESSIONS: { | ||
type: 'track', | ||
name: 'ImpressionsConfig', | ||
}, | ||
CLICKS: { | ||
type: 'track', | ||
name: 'ClicksConfig', | ||
}, | ||
CONVERSIONS: { | ||
type: 'track', | ||
name: 'ConversionsConfig', | ||
}, | ||
}; | ||
|
||
const MAPPING_CONFIG = getMappingConfig(CONFIG_CATEGORIES, __dirname); | ||
|
||
module.exports = { | ||
EVENT_TYPES, | ||
CONFIG_CATEGORIES, | ||
MAPPING_CONFIG, | ||
IMPRESSIONS_CONFIG: MAPPING_CONFIG[CONFIG_CATEGORIES.IMPRESSIONS.name], | ||
CLICKS_CONFIG: MAPPING_CONFIG[CONFIG_CATEGORIES.CLICKS.name], | ||
CONVERSIONS_CONFIG: MAPPING_CONFIG[CONFIG_CATEGORIES.CONVERSIONS.name], | ||
}; |
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,35 @@ | ||
[ | ||
{ | ||
"sourceKeys": "properties.tracking_data", | ||
"required": true, | ||
"destKey": "trackingData" | ||
}, | ||
{ | ||
"sourceKeys": "properties.rank", | ||
"required": true, | ||
"destKey": "rank" | ||
}, | ||
{ | ||
"sourceKeys": "properties.beacon_issued", | ||
"required": true, | ||
"destKey": "beaconIssued" | ||
}, | ||
{ | ||
"sourceKeys": "userId", | ||
"sourceFromGenericMap": true, | ||
"required": true, | ||
"destKey": "userGuid" | ||
}, | ||
{ | ||
"sourceKeys": "properties.test_version_override", | ||
"destKey": "testVersionOverride" | ||
}, | ||
{ | ||
"sourceKeys": "properties.destination_url", | ||
"destKey": "destinationUrl" | ||
}, | ||
{ | ||
"sourceKeys": "properties.overrides", | ||
"destKey": "overrides" | ||
} | ||
] |
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,53 @@ | ||
[ | ||
{ | ||
"sourceKeys": "context.page.referring_domain", | ||
"destKey": "domain" | ||
}, | ||
{ | ||
"sourceKeys": "context.locale", | ||
"required": true, | ||
"destKey": "culture" | ||
}, | ||
{ | ||
"sourceKeys": "properties.currency", | ||
"required": true, | ||
"destKey": "currency" | ||
}, | ||
{ | ||
"sourceKeys": ["context.ip", "request_ip"], | ||
"destKey": "user_ip" | ||
}, | ||
{ | ||
"sourceKeys": "context.userAgent", | ||
"destKey": "user_agent" | ||
}, | ||
{ | ||
"sourceKeys": "userId", | ||
"sourceFromGenericMap": true, | ||
"required": true, | ||
"destKey": "user_guid" | ||
}, | ||
{ | ||
"sourceKeys": "context.device.type", | ||
"destKey": "device_type" | ||
}, | ||
{ | ||
"sourceKeys": ["properties.order_id", "properties.transaction_id"], | ||
"required": true, | ||
"destKey": "transaction_id" | ||
}, | ||
{ | ||
"sourceKeys": "properties.conversion_source", | ||
"destKey": "conversion_source" | ||
}, | ||
{ | ||
"sourceKeys": "timestamp", | ||
"sourceFromGenericMap": true, | ||
"destKey": "unixtime" | ||
}, | ||
{ | ||
"sourceKeys": "properties.bidders", | ||
"required": true, | ||
"destKey": "bidders" | ||
} | ||
] |
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,22 @@ | ||
[ | ||
{ | ||
"sourceKeys": "properties.tracking_data", | ||
"required": true, | ||
"destKey": "trackingData" | ||
}, | ||
{ | ||
"sourceKeys": "properties.rank", | ||
"required": true, | ||
"destKey": "rank" | ||
}, | ||
{ | ||
"sourceKeys": "properties.beacon_issued", | ||
"required": true, | ||
"destKey": "beaconIssued" | ||
}, | ||
{ | ||
"sourceKeys": "timestamp", | ||
"sourceFromGenericMap": true, | ||
"destKey": "ts" | ||
} | ||
] |
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,33 @@ | ||
bindings: | ||
- name: EventType | ||
path: ../../../../constants | ||
- path: ../../bindings/jsontemplate | ||
- name: removeUndefinedAndNullValues | ||
path: ../../../../v0/util | ||
- path: ./utils | ||
- path: ./config | ||
|
||
steps: | ||
- name: messageType | ||
template: | | ||
.message.type.toLowerCase(); | ||
- name: eventType | ||
template: | | ||
.message.integrations.koddi.eventType.toLowerCase(); | ||
- name: validateInput | ||
template: | | ||
let messageType = $.outputs.messageType; | ||
let eventType = $.outputs.eventType; | ||
$.assert(messageType, "message Type is not present. Aborting message."); | ||
$.assert(messageType in {{$.EventType.([.TRACK])}}, "message type " + messageType + " is not supported"); | ||
$.assert(eventType in {{$.EVENT_TYPES.([.IMPRESSIONS, .CLICKS, .CONVERSIONS])}}, "event type " + eventType + " is not supported"); | ||
$.assertConfig(.destination.Config.apiBaseUrl, "API Base URL is not present. Aborting"); | ||
$.assertConfig(.destination.Config.clientName, "Client Name is not present. Aborting"); | ||
- name: preparePayload | ||
template: | | ||
const payload = $.constructFullPayload($.outputs.eventType, .message, .destination.Config); | ||
$.context.payload = $.removeUndefinedAndNullValues(payload); | ||
- name: buildResponse | ||
template: | | ||
const response = $.constructResponse($.outputs.eventType, .destination.Config, $.context.payload); | ||
response |
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,31 @@ | ||
bindings: | ||
- name: handleRtTfSingleEventError | ||
path: ../../../../v0/util/index | ||
|
||
steps: | ||
- name: validateInput | ||
template: | | ||
$.assert(Array.isArray(^) && ^.length > 0, "Invalid event array") | ||
- name: transform | ||
externalWorkflow: | ||
path: ./procWorkflow.yaml | ||
loopOverInput: true | ||
|
||
- name: successfulEvents | ||
template: | | ||
$.outputs.transform#idx.output.({ | ||
"batchedRequest": ., | ||
"batched": false, | ||
"destination": ^[idx].destination, | ||
"metadata": ^[idx].metadata[], | ||
"statusCode": 200 | ||
})[] | ||
- name: failedEvents | ||
template: | | ||
$.outputs.transform#idx.error.( | ||
$.handleRtTfSingleEventError(^[idx], .originalError ?? ., {}) | ||
)[] | ||
- name: finalPayload | ||
template: | | ||
[...$.outputs.successfulEvents, ...$.outputs.failedEvents] |
Oops, something went wrong.