From e694bc72a5c55dd4373db2a578b32d59e4538188 Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 19 Nov 2025 14:41:15 +0100 Subject: [PATCH 1/4] add presets --- .../src/destinations/survicate/index.ts | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/packages/destination-actions/src/destinations/survicate/index.ts b/packages/destination-actions/src/destinations/survicate/index.ts index 68988c7335..3bf76bf3be 100644 --- a/packages/destination-actions/src/destinations/survicate/index.ts +++ b/packages/destination-actions/src/destinations/survicate/index.ts @@ -1,9 +1,39 @@ -import { DestinationDefinition } from '@segment/actions-core' +import { DestinationDefinition, defaultValues } from '@segment/actions-core' import { Settings } from './generated-types' import identifyUser from './identifyUser' import trackEvent from './trackEvent' import identifyGroup from './identifyGroup' +const presets: DestinationDefinition['presets'] = [ + { + name: 'Track Events', + subscribe: 'type = "track"', + partnerAction: 'trackEvent', + mapping: { + ...defaultValues(trackEvent.fields) + }, + type: 'automatic' + }, + { + name: 'Identify Calls', + subscribe: 'type = "identify"', + partnerAction: 'identifyUser', + mapping: { + ...defaultValues(identifyUser.fields) + }, + type: 'automatic' + }, + { + name: 'Group Calls', + subscribe: 'type = "group"', + partnerAction: 'identifyGroup', + mapping: { + ...defaultValues(identifyGroup.fields) + }, + type: 'automatic' + } +] + const destination: DestinationDefinition = { name: 'Survicate Cloud Mode (Actions)', slug: 'actions-survicate-cloud', @@ -38,6 +68,7 @@ const destination: DestinationDefinition = { } }, + presets, actions: { trackEvent, identifyUser, From 70161c415c86ede50aef2283609cfd5b5b9ff8b6 Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 20 Nov 2025 13:17:34 +0100 Subject: [PATCH 2/4] fix style --- .../src/destinations/survicate/index.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/destination-actions/src/destinations/survicate/index.ts b/packages/destination-actions/src/destinations/survicate/index.ts index 3bf76bf3be..1012572e56 100644 --- a/packages/destination-actions/src/destinations/survicate/index.ts +++ b/packages/destination-actions/src/destinations/survicate/index.ts @@ -9,27 +9,21 @@ const presets: DestinationDefinition['presets'] = [ name: 'Track Events', subscribe: 'type = "track"', partnerAction: 'trackEvent', - mapping: { - ...defaultValues(trackEvent.fields) - }, + mapping: { ...defaultValues(trackEvent.fields) }, type: 'automatic' }, { name: 'Identify Calls', subscribe: 'type = "identify"', partnerAction: 'identifyUser', - mapping: { - ...defaultValues(identifyUser.fields) - }, + mapping: { ...defaultValues(identifyUser.fields) }, type: 'automatic' }, { name: 'Group Calls', subscribe: 'type = "group"', partnerAction: 'identifyGroup', - mapping: { - ...defaultValues(identifyGroup.fields) - }, + mapping: { ...defaultValues(identifyGroup.fields) }, type: 'automatic' } ] From 92348a2e92d009b4817cf3a1d93e98c742fca278 Mon Sep 17 00:00:00 2001 From: Anna Date: Fri, 21 Nov 2025 11:15:01 +0100 Subject: [PATCH 3/4] update dependencies --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 3b2893e06b..d70fef8df2 100644 --- a/package.json +++ b/package.json @@ -115,6 +115,7 @@ } }, "dependencies": { + "ansi-regex": "^6.0.1", "chance": "^1.1.8", "liquidjs": "^10.21.0", "xml-js": "^1.6.11" From 18665807353e85ec532ba01308560dee1229638b Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 24 Nov 2025 10:22:20 +0100 Subject: [PATCH 4/4] remove ansi-regex --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index d70fef8df2..80b117d4ea 100644 --- a/package.json +++ b/package.json @@ -115,9 +115,8 @@ } }, "dependencies": { - "ansi-regex": "^6.0.1", "chance": "^1.1.8", "liquidjs": "^10.21.0", "xml-js": "^1.6.11" } -} +} \ No newline at end of file