Skip to content
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

chore(release): pull main into develop post release v1.75.0 #1436

Merged
merged 9 commits into from
Jun 3, 2024
2 changes: 1 addition & 1 deletion src/configurations/destinations/reddit_pixel/schema.json
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@
"connectionMode": {
"type": "object",
"properties": {
"web": { "type": "string", "enum": ["web"] }
"web": { "type": "string", "enum": ["device"] }
}
},
"eventFilteringOption": {
80 changes: 80 additions & 0 deletions test/data/validation/destinations/reddit_pixel.json
Original file line number Diff line number Diff line change
@@ -86,6 +86,9 @@
{ "to": "Search", "from": "Search" },
{ "to": "SignUp", "from": "SignUp" }
],
"connectionMode": {
"web": "device"
},
"whitelistedEvents": [],
"blacklistedEvents": [],
"oneTrustCookieCategories": []
@@ -104,6 +107,9 @@
"resolutionStrategy": "nor"
}
]
},
"connectionMode": {
"web": "device"
}
},
"result": false,
@@ -158,5 +164,79 @@
},
"result": false,
"err": ["consentManagement.web.0.provider must be equal to one of the allowed values"]
},
{
"testTitle": "With invalid connectionMode",
"config": {
"eventFilteringOption": "disable",
"advertiserId": "01234567890123456789012345678901234567890123456789",
"whitelistedEvents": [],
"blacklistedEvents": [],
"oneTrustCookieCategories": [],
"connectionMode": {
"web": "cloud"
}
},
"result": false,
"err": ["connectionMode.web must be equal to one of the allowed values"]
},
{
"testTitle": "check with all possible event names",
"config": {
"advertiserId": "12345",
"eventFilteringOption": "disable",
"eventMappingFromConfig": [
{
"from": "123123",
"to": "AddToCart"
},
{
"to": "AddToWishlist",
"from": "1"
},
{
"to": "Purchase",
"from": "2"
},
{
"to": "Lead",
"from": "3"
},
{
"to": "ViewContent",
"from": "4"
},
{
"to": "Search",
"from": "5"
},
{
"to": "SignUp",
"from": "6"
},
{
"to": "AddToWishlist",
"from": "6"
}
],
"whitelistedEvents": [],
"blacklistedEvents": [],
"useNativeSDK": {
"web": true
},
"connectionMode": {
"web": "device"
},
"consentManagement": {
"web": [
{
"provider": "oneTrust",
"resolutionStrategy": "",
"consents": []
}
]
}
},
"result": true
}
]

Unchanged files with check annotations Beta

}
}
export async function validateDestinationDefinitions(destDefConfig: any): Promise<boolean> {

Check warning on line 62 in src/validator/index.ts

GitHub Actions / Check for formatting & lint errors

Unexpected any. Specify a different type
const ddAjv = new Ajv({
allErrors: true,
useDefaults: true,
return true;
}
export async function validateSourceDefinitions(srcDefConfig: any): Promise<boolean> {

Check warning on line 90 in src/validator/index.ts

GitHub Actions / Check for formatting & lint errors

Unexpected any. Specify a different type
const ddAjv = new Ajv({
allErrors: true,
useDefaults: true,