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 hotfix-release/v1.43.1 into main #798

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.43.1](https://github.com/rudderlabs/rudder-config-schema/compare/v1.43.0...v1.43.1) (2023-07-28)

## [1.43.0](https://github.com/rudderlabs/rudder-config-schema/compare/v1.42.2...v1.43.0) (2023-07-24)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder-config-schema",
"version": "1.43.0",
"version": "1.43.1",
"description": "",
"main": "src/index.ts",
"private": true,
Expand Down
5 changes: 1 addition & 4 deletions scripts/schemaGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

CONFIG_DIR = 'src/configurations'

EXCLUDED_DEST = ['postgres']

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


if __name__ == '__main__':
Expand Down
137 changes: 52 additions & 85 deletions src/configurations/destinations/hs/schema.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,68 @@
{
"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})$"
},
"authorizationType": {
"apiKey": {
"type": "string",
"enum": ["legacyApiKey", "newPrivateAppApi"],
"default": "legacyApiKey"
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"accessToken": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
},
"apiVersion": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(legacyApi|newApi)$"
},
"lookupField": {
"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})$"
}
}
}
}
}
}
},
"apiVersion": { "type": "string", "enum": ["legacyApi", "newApi"], "default": "legacyApi" },
"useNativeSDK": { "type": "object", "properties": { "web": { "type": "boolean" } } },
"eventFilteringOption": {
"type": "string",
"enum": ["disable", "whitelistedEvents", "blacklistedEvents"],
"default": "disable"
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(disable|whitelistedEvents|blacklistedEvents)$"
},
"whitelistedEvents": {
"type": "array",
Expand Down Expand Up @@ -56,83 +100,6 @@
}
}
}
},
"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"]
}
}
]
}
}
}
12 changes: 6 additions & 6 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": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"regex": "^(.{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": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$",
"regex": "^(.{0,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": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$",
"regex": "^(.{0,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": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$",
"regex": "^(.{0,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": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"regex": "^(.{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": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"regex": "^(.{0,100})$",
"required": false,
"placeholder": "e.g Search",
"footerNote": "Enter the corresponding Hubspot event name you want to map"
Expand Down
Loading
Loading