From 5e46f160102b87a5bbc342ef637034801294c9a9 Mon Sep 17 00:00:00 2001 From: Gauravudia Date: Tue, 8 Aug 2023 20:35:26 +0530 Subject: [PATCH] feat(zendesk): add source name setting --- .../destinations/zendesk/db-config.json | 3 ++- .../destinations/zendesk/schema.json | 20 +++++++++++++++---- .../destinations/zendesk/ui-config.json | 10 ++++++++++ .../data/validation/destinations/zendesk.json | 15 +++++++++++++- 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/configurations/destinations/zendesk/db-config.json b/src/configurations/destinations/zendesk/db-config.json index e3955fd2f..16e3f2cc3 100644 --- a/src/configurations/destinations/zendesk/db-config.json +++ b/src/configurations/destinations/zendesk/db-config.json @@ -30,7 +30,8 @@ "sendGroupCallsWithoutUserId", "removeUsersFromOrganization", "searchByExternalId", - "oneTrustCookieCategories" + "oneTrustCookieCategories", + "sourceName" ] }, "secretKeys": ["apiToken"] diff --git a/src/configurations/destinations/zendesk/schema.json b/src/configurations/destinations/zendesk/schema.json index 47acc678a..3bc064fd6 100644 --- a/src/configurations/destinations/zendesk/schema.json +++ b/src/configurations/destinations/zendesk/schema.json @@ -17,10 +17,22 @@ "type": "string", "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" }, - "createUsersAsVerified": { "type": "boolean" }, - "sendGroupCallsWithoutUserId": { "type": "boolean" }, - "removeUsersFromOrganization": { "type": "boolean" }, - "searchByExternalId": { "type": "boolean" }, + "sourceName": { + "type": "string", + "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$" + }, + "createUsersAsVerified": { + "type": "boolean" + }, + "sendGroupCallsWithoutUserId": { + "type": "boolean" + }, + "removeUsersFromOrganization": { + "type": "boolean" + }, + "searchByExternalId": { + "type": "boolean" + }, "oneTrustCookieCategories": { "type": "array", "items": { diff --git a/src/configurations/destinations/zendesk/ui-config.json b/src/configurations/destinations/zendesk/ui-config.json index 4a61ed791..0aea6f4c3 100644 --- a/src/configurations/destinations/zendesk/ui-config.json +++ b/src/configurations/destinations/zendesk/ui-config.json @@ -31,6 +31,16 @@ "required": true, "placeholder": "Subdomain only not including .zendesk.com" }, + { + "type": "textInput", + "label": "Source Name", + "value": "sourceName", + "regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$", + "regexErrorMessage": "Invalid Source", + "required": false, + "placeholder": "e.g: Rudder", + "footerNote": "Specify the source for the events. If not specified, the source is set to `Rudder` by default." + }, { "type": "checkbox", "label": "Create users as verified", diff --git a/test/data/validation/destinations/zendesk.json b/test/data/validation/destinations/zendesk.json index 25ce04825..602cf04e1 100644 --- a/test/data/validation/destinations/zendesk.json +++ b/test/data/validation/destinations/zendesk.json @@ -6,7 +6,20 @@ "domain": "coover", "createUsersAsVerified": true, "sendGroupCallsWithoutUserId": false, - "removeUsersFromOrganization": false + "removeUsersFromOrganization": false, + "sourceName": "abc" + }, + "result": true + }, + { + "config": { + "email": "rodrigo@coover.me", + "apiToken": "WpUn4Q6xTqXwvKUGDVcbWY7HxmUoOdEBvKIIOKP3", + "domain": "coover", + "createUsersAsVerified": true, + "sendGroupCallsWithoutUserId": false, + "removeUsersFromOrganization": false, + "sourceName": "" }, "result": true },