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" diff --git a/packages/destination-actions/src/destinations/survicate/index.ts b/packages/destination-actions/src/destinations/survicate/index.ts index 68988c7335..1012572e56 100644 --- a/packages/destination-actions/src/destinations/survicate/index.ts +++ b/packages/destination-actions/src/destinations/survicate/index.ts @@ -1,9 +1,33 @@ -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 +62,7 @@ const destination: DestinationDefinition = { } }, + presets, actions: { trackEvent, identifyUser,