From 3d88d6da1193ae5af5cbfa0d1dc82054be6c6727 Mon Sep 17 00:00:00 2001 From: Sean Craswell Date: Tue, 1 Apr 2025 18:46:30 -0300 Subject: [PATCH 1/5] DX-516: Pin actions to SHA --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47dc9747c2b..51edbcf28c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: Use Github Personal Access Token run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://git@github.com/ - - uses: nrwl/nx-set-shas@v3 # nx recipe + - uses: nrwl/nx-set-shas@2e421aafa0e05640f0cd84a7a3521c8c3be44d16 # v3.3.2 - name: Install Dependencies run: yarn install --frozen-lockfile @@ -69,7 +69,7 @@ jobs: - name: Use Github Personal Access Token run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://git@github.com/ - - uses: nrwl/nx-set-shas@v3 # nx recipe + - uses: nrwl/nx-set-shas@2e421aafa0e05640f0cd84a7a3521c8c3be44d16 # v3.3.2 - name: Install Dependencies run: yarn install --frozen-lockfile @@ -108,7 +108,7 @@ jobs: - name: Use Github Personal Access Token run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://git@github.com/ - - uses: nrwl/nx-set-shas@v3 # nx recipe + - uses: nrwl/nx-set-shas@2e421aafa0e05640f0cd84a7a3521c8c3be44d16 # v3.3.2 - name: Install Dependencies run: yarn install --frozen-lockfile @@ -267,7 +267,7 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/node@master + uses: snyk/actions/node@cdb760004ba9ea4d525f2e043745dfe85bb9077e # master env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: From 32c0de3a267b90b52d322d4a20ef87efbd8a9ef0 Mon Sep 17 00:00:00 2001 From: "Dr.J" Date: Tue, 10 Mar 2026 10:32:50 -0700 Subject: [PATCH 2/5] Align Customer.io preset subscriptions with reserved events --- .../customerio/__tests__/index.test.ts | 38 ++++++++++++ .../customerio/createUpdateDevice/index.ts | 3 +- .../src/destinations/customerio/index.ts | 60 ++++++++++++++++++- .../customerio/trackEvent/index.ts | 7 ++- 4 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts diff --git a/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts b/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts new file mode 100644 index 00000000000..2a9785f0460 --- /dev/null +++ b/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts @@ -0,0 +1,38 @@ +import destination from '../index' + +describe('customerio presets', () => { + it('includes the generic automatic lifecycle presets', () => { + const automaticPresetNames = destination.presets + ?.filter((preset) => preset.type === 'automatic') + .map((preset) => preset.name) + + expect(automaticPresetNames).toEqual( + expect.arrayContaining([ + 'Delete Device', + 'Delete Relationship', + 'Delete Person', + 'Delete Object', + 'Merge People', + 'Suppress Person', + 'Unsuppress Person' + ]) + ) + }) + + it('includes Device Created or Updated in the create/update device subscriptions', () => { + const preset = destination.presets?.find((candidate) => candidate.name === 'Create or Update Device') + + expect(preset?.subscribe).toContain('Device Created or Updated') + expect(destination.actions.createUpdateDevice.defaultSubscription).toContain('Device Created or Updated') + }) + + it('excludes reserved device and object events from the generic track event surface', () => { + const preset = destination.presets?.find((candidate) => candidate.name === 'Track Event') + + expect(preset?.subscribe).toContain('event != "Device Created or Updated"') + expect(preset?.subscribe).toContain('event != "Device Deleted"') + expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Device Created or Updated"') + expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Device Deleted"') + expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Object Deleted"') + }) +}) diff --git a/packages/destination-actions/src/destinations/customerio/createUpdateDevice/index.ts b/packages/destination-actions/src/destinations/customerio/createUpdateDevice/index.ts index 62874bbd440..10d008fa164 100644 --- a/packages/destination-actions/src/destinations/customerio/createUpdateDevice/index.ts +++ b/packages/destination-actions/src/destinations/customerio/createUpdateDevice/index.ts @@ -7,7 +7,8 @@ import { eventProperties } from '../customerio-properties' const action: ActionDefinition = { title: 'Create or Update Device', description: `Create or update a person's device.`, - defaultSubscription: 'type = "track" and event = "Application Installed"', + defaultSubscription: + 'event = "Application Installed" or event = "Application Opened" or event = "Device Created or Updated"', fields: { person_id: { label: 'Person ID', diff --git a/packages/destination-actions/src/destinations/customerio/index.ts b/packages/destination-actions/src/destinations/customerio/index.ts index 8e113b4ef96..a0d1457c22f 100644 --- a/packages/destination-actions/src/destinations/customerio/index.ts +++ b/packages/destination-actions/src/destinations/customerio/index.ts @@ -88,15 +88,52 @@ const destination: DestinationDefinition = { }, { name: 'Create or Update Device', - subscribe: 'event = "Application Installed" or event = "Application Opened"', + subscribe: ` + event = "Application Installed" + or event = "Application Opened" + or event = "Device Created or Updated" + `, partnerAction: 'createUpdateDevice', mapping: defaultValues(createUpdateDevice.fields), type: 'automatic' }, + { + name: 'Delete Device', + subscribe: 'event = "Application Uninstalled" or event = "Device Deleted"', + partnerAction: 'deleteDevice', + mapping: defaultValues(deleteDevice.fields), + type: 'automatic' + }, + { + name: 'Delete Relationship', + subscribe: 'event = "Relationship Deleted"', + partnerAction: 'deleteRelationship', + mapping: defaultValues(deleteRelationship.fields), + type: 'automatic' + }, + { + name: 'Delete Person', + subscribe: 'event = "User Deleted"', + partnerAction: 'deletePerson', + mapping: defaultValues(deletePerson.fields), + type: 'automatic' + }, + { + name: 'Delete Object', + subscribe: 'event = "Object Deleted"', + partnerAction: 'deleteObject', + mapping: defaultValues(deleteObject.fields), + type: 'automatic' + }, { name: 'Track Event', subscribe: ` type = "track" + and event != "Application Installed" + and event != "Application Opened" + and event != "Application Uninstalled" + and event != "Device Created or Updated" + and event != "Device Deleted" and event != "Relationship Deleted" and event != "User Deleted" and event != "User Suppressed" @@ -130,6 +167,27 @@ const destination: DestinationDefinition = { mapping: defaultValues(createUpdateObject.fields), type: 'automatic' }, + { + name: 'Merge People', + subscribe: 'type = "alias"', + partnerAction: 'mergePeople', + mapping: defaultValues(mergePeople.fields), + type: 'automatic' + }, + { + name: 'Suppress Person', + subscribe: 'event = "User Suppressed"', + partnerAction: 'suppressPerson', + mapping: defaultValues(suppressPerson.fields), + type: 'automatic' + }, + { + name: 'Unsuppress Person', + subscribe: 'event = "User Unsuppressed"', + partnerAction: 'unsuppressPerson', + mapping: defaultValues(unsuppressPerson.fields), + type: 'automatic' + }, { name: 'Report Delivery Event', subscribe: 'event = "Report Delivery Event"', diff --git a/packages/destination-actions/src/destinations/customerio/trackEvent/index.ts b/packages/destination-actions/src/destinations/customerio/trackEvent/index.ts index 2956a51a99b..fb2b22cadb0 100644 --- a/packages/destination-actions/src/destinations/customerio/trackEvent/index.ts +++ b/packages/destination-actions/src/destinations/customerio/trackEvent/index.ts @@ -9,11 +9,16 @@ const action: ActionDefinition = { description: 'Track an event for a known or anonymous person.', defaultSubscription: ` type = "track" + and event != "Application Installed" + and event != "Application Opened" + and event != "Application Uninstalled" + and event != "Device Created or Updated" + and event != "Device Deleted" and event != "Relationship Deleted" and event != "User Deleted" and event != "User Suppressed" and event != "User Unsuppressed" - and event != "Group Deleted" + and event != "Object Deleted" and event != "Report Delivery Event" `, fields: { From a4ac847e29f4689a2578b37d8b40086046215744 Mon Sep 17 00:00:00 2001 From: Sydney Collins Date: Tue, 21 Apr 2026 09:55:20 -0400 Subject: [PATCH 3/5] fix: exclude Report Content Event from trackEvent defaultSubscription to match preset filter --- .../src/destinations/customerio/__tests__/index.test.ts | 2 +- .../src/destinations/customerio/trackEvent/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts b/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts index 2a9785f0460..1012202e88b 100644 --- a/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts +++ b/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts @@ -34,5 +34,5 @@ describe('customerio presets', () => { expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Device Created or Updated"') expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Device Deleted"') expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Object Deleted"') + expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Report Content Event"') }) -}) diff --git a/packages/destination-actions/src/destinations/customerio/trackEvent/index.ts b/packages/destination-actions/src/destinations/customerio/trackEvent/index.ts index fb2b22cadb0..9e2a8b6bcfa 100644 --- a/packages/destination-actions/src/destinations/customerio/trackEvent/index.ts +++ b/packages/destination-actions/src/destinations/customerio/trackEvent/index.ts @@ -20,6 +20,7 @@ const action: ActionDefinition = { and event != "User Unsuppressed" and event != "Object Deleted" and event != "Report Delivery Event" + and event != "Report Content Event" `, fields: { id: { From a917de0c6aa28f8803f0cd035265ecaf5f68b0cb Mon Sep 17 00:00:00 2001 From: Sydney Collins Date: Tue, 21 Apr 2026 10:12:47 -0400 Subject: [PATCH 4/5] chore: revert ci.yml to branch state, not ours to change --- .github/workflows/ci.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f9277b8ac0..c29f9caca3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: Use Github Personal Access Token run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://git@github.com/ - - uses: nrwl/nx-set-shas@2e421aafa0e05640f0cd84a7a3521c8c3be44d16 # v3.3.2 + - uses: nrwl/nx-set-shas@v3 # nx recipe - name: Install Dependencies run: yarn install --frozen-lockfile @@ -73,10 +73,7 @@ jobs: registry-url: 'https://registry.npmjs.org' cache: yarn - - name: Use Github Personal Access Token - run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://git@github.com/ - - - uses: nrwl/nx-set-shas@2e421aafa0e05640f0cd84a7a3521c8c3be44d16 # v3.3.2 + - uses: nrwl/nx-set-shas@v3 # nx recipe - name: Install Dependencies run: yarn install --frozen-lockfile @@ -110,10 +107,7 @@ jobs: registry-url: 'https://registry.npmjs.org' cache: yarn - - name: Use Github Personal Access Token - run: git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf ssh://git@github.com/ - - - uses: nrwl/nx-set-shas@2e421aafa0e05640f0cd84a7a3521c8c3be44d16 # v3.3.2 + - uses: nrwl/nx-set-shas@v3 # nx recipe - name: Install Dependencies run: yarn install --frozen-lockfile @@ -255,7 +249,7 @@ jobs: run: yarn install --frozen-lockfile - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/node@cdb760004ba9ea4d525f2e043745dfe85bb9077e # master + uses: snyk/actions/node@master env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: From f1ac0232959a7f27835a75292233ffe883c91edd Mon Sep 17 00:00:00 2001 From: sydneycollins-cio <149523950+sydneycollins-cio@users.noreply.github.com> Date: Thu, 23 Apr 2026 10:05:08 -0400 Subject: [PATCH 5/5] fix: close describe block in customerio preset parity test --- .../src/destinations/customerio/__tests__/index.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts b/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts index 1012202e88b..52f4b72e77f 100644 --- a/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts +++ b/packages/destination-actions/src/destinations/customerio/__tests__/index.test.ts @@ -36,3 +36,4 @@ describe('customerio presets', () => { expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Object Deleted"') expect(destination.actions.trackEvent.defaultSubscription).toContain('event != "Report Content Event"') }) +})