-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: onboard cordial destination (#1558)
- Loading branch information
1 parent
339a898
commit e9f2b33
Showing
4 changed files
with
266 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"name": "CORDIAL", | ||
"displayName": "Cordial", | ||
"config": { | ||
"cdkV2Enabled": true, | ||
"transformAtV1": "router", | ||
"saveDestinationResponse": true, | ||
"supportedSourceTypes": [ | ||
"android", | ||
"ios", | ||
"web", | ||
"unity", | ||
"amp", | ||
"cloud", | ||
"warehouse", | ||
"reactnative", | ||
"flutter", | ||
"cordova", | ||
"shopify" | ||
], | ||
"supportedConnectionModes": { | ||
"web": ["cloud"], | ||
"android": ["cloud"], | ||
"ios": ["cloud"], | ||
"unity": ["cloud"], | ||
"amp": ["cloud"], | ||
"cloud": ["cloud"], | ||
"warehouse": ["cloud"], | ||
"reactnative": ["cloud"], | ||
"flutter": ["cloud"], | ||
"cordova": ["cloud"], | ||
"shopify": ["cloud"] | ||
}, | ||
"supportedMessageTypes": { | ||
"cloud": ["identify", "track"] | ||
}, | ||
"destConfig": { | ||
"defaultConfig": ["apiKey", "apiBaseUrl", "oneTrustCookieCategories"], | ||
"android": ["connectionMode"], | ||
"ios": ["connectionMode"], | ||
"web": ["connectionMode"], | ||
"unity": ["connectionMode"], | ||
"amp": ["connectionMode"], | ||
"cloud": ["connectionMode"], | ||
"warehouse": ["connectionMode"], | ||
"reactnative": ["connectionMode"], | ||
"flutter": ["connectionMode"], | ||
"cordova": ["connectionMode"], | ||
"shopify": ["connectionMode"] | ||
}, | ||
"secretKeys": ["apiKey"] | ||
}, | ||
"options": { | ||
"isBeta": true | ||
} | ||
} |
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,78 @@ | ||
{ | ||
"configSchema": { | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"required": ["apiKey", "apiBaseUrl"], | ||
"type": "object", | ||
"properties": { | ||
"apiKey": { | ||
"type": "string", | ||
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$" | ||
}, | ||
"apiBaseUrl": { | ||
"type": "string", | ||
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$|^$" | ||
}, | ||
"oneTrustCookieCategories": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"oneTrustCookieCategory": { | ||
"type": "string", | ||
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" | ||
} | ||
} | ||
} | ||
}, | ||
"connectionMode": { | ||
"type": "object", | ||
"properties": { | ||
"android": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"ios": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"web": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"unity": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"amp": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"reactnative": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"flutter": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"cordova": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"shopify": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"cloud": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
}, | ||
"warehouse": { | ||
"type": "string", | ||
"enum": ["cloud"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,106 @@ | ||
{ | ||
"uiConfig": { | ||
"baseTemplate": [ | ||
{ | ||
"title": "Initial setup", | ||
"note": "Review how this destination is set up", | ||
"sections": [ | ||
{ | ||
"groups": [ | ||
{ | ||
"title": "Connection settings", | ||
"icon": "settings", | ||
"fields": [ | ||
{ | ||
"type": "textInput", | ||
"label": "API Key", | ||
"note": [ | ||
"To create a new API Key, navigate to Settings > API Keys. ", | ||
{ | ||
"text": "Learn more here", | ||
"link": "https://support.cordial.com/hc/en-us/articles/115005365087-API-keys" | ||
} | ||
], | ||
"configKey": "apiKey", | ||
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{1,100})$", | ||
"regexErrorMessage": "Invalid API Key", | ||
"placeholder": "e.g. 753723xxx" | ||
}, | ||
{ | ||
"type": "textInput", | ||
"label": "API Base URL", | ||
"note": "You can find out which one your account uses by navigating to your Cordial dashboard and checking the website URL.", | ||
"configKey": "apiBaseUrl", | ||
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|(?!.*\\.ngrok\\.io)^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$|^$", | ||
"regexErrorMessage": "Invalid API Base URl", | ||
"placeholder": "e.g. https://usw2.admin.cordial.io" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"groups": [ | ||
{ | ||
"title": "Connection mode", | ||
"note": [ | ||
"Update how you want to route events from your source to destination. ", | ||
{ | ||
"text": "Get help deciding", | ||
"link": "https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/" | ||
} | ||
], | ||
"icon": "sliders", | ||
"fields": [] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Configuration settings", | ||
"note": "Manage the settings for your destination", | ||
"sections": [ | ||
{ | ||
"title": "Other settings", | ||
"note": "Configure advanced RudderStack features here", | ||
"icon": "otherSettings", | ||
"groups": [ | ||
{ | ||
"title": "OneTrust cookie consent settings", | ||
"note": [ | ||
"Enter your OneTrust category names if you have them configured. ", | ||
{ | ||
"text": "Learn more ", | ||
"link": "https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/onetrust-consent-manager/" | ||
}, | ||
"about RudderStack's OneTrust Consent Manager feature." | ||
], | ||
"fields": [ | ||
{ | ||
"type": "tagInput", | ||
"label": "Cookie category name", | ||
"note": "Input your OneTrust category names by pressing 'Enter' after each entry", | ||
"configKey": "oneTrustCookieCategories", | ||
"tagKey": "oneTrustCookieCategory", | ||
"placeholder": "e.g: Credit card visit", | ||
"default": [ | ||
{ | ||
"oneTrustCookieCategory": "" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"sdkTemplate": { | ||
"title": "SDK settings", | ||
"note": "not visible in the ui", | ||
"fields": [] | ||
} | ||
} | ||
} |
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,26 @@ | ||
[ | ||
{ | ||
"config": { | ||
"apiBaseUrl": "https://abc.example.com", | ||
"apiKey": "test-accessKey", | ||
"oneTrustCookieCategories": [ | ||
{ | ||
"oneTrustCookieCategory": "Marketing" | ||
} | ||
] | ||
}, | ||
"result": true | ||
}, | ||
{ | ||
"config": { | ||
"apiBaseUrl": "https://abc.example.com", | ||
"oneTrustCookieCategories": [ | ||
{ | ||
"oneTrustCookieCategory": "Marketing" | ||
} | ||
] | ||
}, | ||
"result": false, | ||
"err": [" must have required property 'apiKey'"] | ||
} | ||
] |