Skip to content

Commit

Permalink
feat: added test cases (#1659)
Browse files Browse the repository at this point in the history
Co-authored-by: Yashasvi Bajpai <[email protected]>
  • Loading branch information
aanshi07 and yashasvibajpai authored Oct 6, 2024
1 parent edcdd2e commit 6339410
Show file tree
Hide file tree
Showing 23 changed files with 789 additions and 52 deletions.
57 changes: 56 additions & 1 deletion src/configurations/destinations/bugsnag/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,64 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"required": ["apiKey"],
"type": "object",
"properties": {
"apiKey": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"eventFilteringOption": {
"type": "string",
"enum": ["disable", "whitelistedEvents", "blacklistedEvents"],
"default": "disable"
},
"whitelistedEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
},
"blacklistedEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
},
"useNativeSDK": {
"type": "object",
"properties": {
"web": {
"type": "boolean"
},
"android": {
"type": "boolean"
},
"ios": {
"type": "boolean"
}
}
},
"releaseStage": {
"type": "object",
"properties": {
"web": {
"type": "boolean"
}
}
},
"consentManagement": {
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion src/configurations/destinations/bugsnag/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "textInput",
"label": "BugSnag Api Key",
"value": "apiKey",
"regex": "^(.{0,100})$",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"regexErrorMessage": "Invalid BugSnag Api Key",
"required": true,
"placeholder": "e.g: 1234567890abcdef12345"
Expand Down
6 changes: 5 additions & 1 deletion src/configurations/destinations/candu/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"required": ["apiKey"],
"type": "object",
"properties": {
"apiKey": {
"type": "string",
"pattern": ".*"
},
"consentManagement": {
"type": "object",
"properties": {
Expand Down
47 changes: 46 additions & 1 deletion src/configurations/destinations/chartbeat/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,54 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"required": ["domain", "uid"],
"type": "object",
"properties": {
"domain": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"uid": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"eventFilteringOption": {
"type": "string",
"enum": ["disable", "whitelistedEvents", "blacklistedEvents"],
"default": "disable"
},
"whitelistedEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
},
"blacklistedEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
},
"useNativeSDK": {
"type": "object",
"properties": {
"web": {
"type": "boolean"
}
}
},
"consentManagement": {
"type": "object",
"properties": {
Expand Down
58 changes: 57 additions & 1 deletion src/configurations/destinations/clevertap/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,65 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"required": ["accountId", "passcode"],
"type": "object",
"properties": {
"accountId": {
"type": "string",
"pattern": ".*"
},
"passcode": {
"type": "string",
"pattern": ".*"
},
"accountToken": {
"type": "string",
"pattern": ".*"
},
"trackAnonymous": { "type": "boolean", "default": false },
"enableObjectIdMapping": { "type": "boolean", "default": false },
"region": {
"type": "string",
"enum": ["none", "in1", "sg1", "us1", "sk1", "aps3", "mec1"],
"default": "none"
},
"eventFilteringOption": {
"type": "string",
"enum": ["disable", "whitelistedEvents", "blacklistedEvents"],
"default": "disable"
},
"whitelistedEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
},
"blacklistedEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
},
"useNativeSDK": {
"type": "object",
"properties": {
"web": {
"type": "boolean"
}
}
},
"consentManagement": {
"type": "object",
"properties": {
Expand Down
18 changes: 17 additions & 1 deletion src/configurations/destinations/confluent_cloud/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"required": ["bootstrapServer", "topic", "apiKey", "apiSecret"],
"type": "object",
"properties": {
"bootstrapServer": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"topic": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"apiKey": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"apiSecret": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"consentManagement": {
"type": "object",
"properties": {
Expand Down
15 changes: 14 additions & 1 deletion src/configurations/destinations/criteo_audience/schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": ["audienceType"],
"required": ["adAccountId", "audienceId", "audienceType", "gumCallerId"],
"type": "object",
"additionalProperties": true,
"properties": {
Expand All @@ -19,6 +19,19 @@
"enum": ["email", "madid", "identityLink", "gum"],
"default": "email"
},
"audienceId": {
"type": "object",
"properties": {
"cloud": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^[0-9]+$"
}
}
},
"gumCallerId": {
"type": "string",
"pattern": "^[0-9]+$"
},
"oneTrustCookieCategories": {
"type": "object",
"properties": {
Expand Down
14 changes: 13 additions & 1 deletion src/configurations/destinations/delighted/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"required": ["apiKey", "channel"],
"type": "object",
"properties": {
"apiKey": {
"type": "string",
"pattern": ".*"
},
"channel": {
"type": "string",
"enum": ["email", "sms"],
"default": "email"
},
"delay": {
"type": "string"
},
"consentManagement": {
"type": "object",
"properties": {
Expand Down
22 changes: 21 additions & 1 deletion src/configurations/destinations/digital_ocean_spaces/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"required": ["endPoint", "accessKeyID", "accessKey", "bucketName"],
"type": "object",
"properties": {
"endPoint": {
"type": "string",
"pattern": "(?!.*\\.ngrok\\.io)^(.{0,100})$"
},
"accessKeyID": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"accessKey": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"bucketName": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"prefix": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"consentManagement": {
"type": "object",
"properties": {
Expand Down
55 changes: 54 additions & 1 deletion src/configurations/destinations/drip/schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,62 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"required": ["accountId"],
"type": "object",
"properties": {
"accountId": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"apiKey": {
"type": "string",
"pattern": ".*"
},
"campaignId": {
"type": "string",
"pattern": "^(.{0,100})$"
},
"enableUserCreation": {
"type": "boolean",
"default": true
},
"eventFilteringOption": {
"type": "string",
"enum": ["disable", "whitelistedEvents", "blacklistedEvents"],
"default": "disable"
},
"whitelistedEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
},
"blacklistedEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
},
"useNativeSDK": {
"type": "object",
"properties": {
"web": {
"type": "boolean"
}
}
},
"consentManagement": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 6339410

Please sign in to comment.