Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into rockerbox_ui_update
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/configurations/destinations/tiktok_ads/schema.json
  • Loading branch information
sandeepdsvs committed Jul 24, 2023
2 parents ede2452 + 9c2dfa0 commit d7d023d
Show file tree
Hide file tree
Showing 100 changed files with 1,519 additions and 768 deletions.
5 changes: 4 additions & 1 deletion scripts/schemaGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

CONFIG_DIR = 'src/configurations'

EXCLUDED_DEST = ['postgres']

class FieldTypeEnum(Enum):
STRING = "string"
OBJECT = "object"
Expand Down Expand Up @@ -1002,7 +1004,8 @@ def get_schema_diff(name, selector):
uiConfig = file_content.get("uiConfig")
schema = file_content.get("configSchema")
dbConfig = file_content.get("config")
validate_config_consistency(name, selector, uiConfig, dbConfig, schema)
if name not in EXCLUDED_DEST:
validate_config_consistency(name, selector, uiConfig, dbConfig, schema)


if __name__ == '__main__':
Expand Down
137 changes: 85 additions & 52 deletions src/configurations/destinations/hs/schema.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,24 @@
{
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"type": "object",
"properties": {
"authorizationType": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(legacyApiKey|newPrivateAppApi)$"
},
"hubID": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"apiKey": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"accessToken": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"apiVersion": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(legacyApi|newApi)$"
},
"lookupField": {
"authorizationType": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"hubspotEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rsEventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"hubspotEventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"eventProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"to": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
}
}
}
"enum": ["legacyApiKey", "newPrivateAppApi"],
"default": "legacyApiKey"
},
"apiVersion": { "type": "string", "enum": ["legacyApi", "newApi"], "default": "legacyApi" },
"useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } },
"eventFilteringOption": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(disable|whitelistedEvents|blacklistedEvents)$"
"enum": ["disable", "whitelistedEvents", "blacklistedEvents"],
"default": "disable"
},
"whitelistedEvents": {
"type": "array",
Expand Down Expand Up @@ -100,6 +56,83 @@
}
}
}
}
},
"allOf": [
{
"if": {
"properties": { "authorizationType": { "const": "legacyApiKey" } },
"required": ["authorizationType"]
},
"then": {
"properties": {
"apiKey": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$"
}
},
"required": ["apiKey"]
}
},
{
"if": {
"properties": { "authorizationType": { "const": "newPrivateAppApi" } },
"required": ["authorizationType"]
},
"then": {
"properties": {
"accessToken": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$"
}
},
"required": ["accessToken"]
}
},
{
"if": { "properties": { "apiVersion": { "const": "newApi" } }, "required": ["apiVersion"] },
"then": {
"properties": {
"lookupField": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$"
},
"doAssociation": { "type": "boolean", "default": false },
"hubspotEvents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rsEventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"hubspotEventName": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"eventProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"to": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
}
}
}
}
}
}
}
},
"required": ["lookupField"]
}
}
]
}
}
24 changes: 15 additions & 9 deletions src/configurations/destinations/hs/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"type": "textInput",
"label": "Hub ID",
"value": "hubID",
"regex": "^(.{0,100})$",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"regexErrorMessage": "Invalid Hub ID",
"required": false,
"placeholder": "e.g: 748991",
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"label": "API Key",
"value": "apiKey",
"regex": "^(.{0,100})$",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$",
"regexErrorMessage": "Invalid API Key",
"required": true,
"placeholder": "e.g: 05afa518-132c-40db-830a-de0f688902f7",
Expand All @@ -53,7 +53,7 @@
},
"label": "Access Token",
"value": "accessToken",
"regex": "^(.{0,100})$",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$",
"regexErrorMessage": "Invalid Access Token",
"required": true,
"placeholder": "e.g: pat-eu1-kjg875ya-9de4-98uu-8171-62875ht847r9",
Expand Down Expand Up @@ -85,7 +85,7 @@
},
"label": "Hubspot property name to be used as lookup field",
"value": "lookupField",
"regex": "^(.{0,100})$",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$",
"regexErrorMessage": "Invalid Property Name",
"required": true,
"placeholder": "e.g: lookupField",
Expand Down Expand Up @@ -114,7 +114,7 @@
"type": "textInput",
"label": "RudderStack Event Name",
"value": "rsEventName",
"regex": "^(.{0,100})$",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"required": false,
"placeholder": "e.g Products Searched",
"footerNote": "Enter the RudderStack event name you want to map"
Expand All @@ -123,7 +123,7 @@
"type": "textInput",
"label": "HubSpot Event Name",
"value": "hubspotEventName",
"regex": "^(.{0,100})$",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"required": false,
"placeholder": "e.g Search",
"footerNote": "Enter the corresponding Hubspot event name you want to map"
Expand Down Expand Up @@ -213,10 +213,16 @@
"title": "Consent Settings",
"fields": [
{
"type": "dynamicCustomForm",
"value": "oneTrustCookieCategories",
"type": "mappingRows",
"label": "OneTrust Cookie Categories",
"customFields": [
"columns": [
{
"type": "textInput",
"placeholder": "Marketing",
"value": "oneTrustCookieCategory",
"label": "Category Name/ID",
"required": false
},
{
"type": "textInput",
"placeholder": "Marketing",
Expand Down
Loading

0 comments on commit d7d023d

Please sign in to comment.