Skip to content

Commit

Permalink
Register First Party DV360 (segmentio#2125)
Browse files Browse the repository at this point in the history
* Register First Party DV360

* update index.ts with destination id

* bootstrap a dummy action to make validate pass

* add action description

---------

Co-authored-by: Varadarajan V <109586712+varadarajan-tw@users.noreply.github.com>
  • Loading branch information
marinhero and varadarajan-tw authored Jul 2, 2024
1 parent 76e2f52 commit cb6b440
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { ActionDefinition } from '@segment/actions-core'
import type { Settings } from '../generated-types'
import type { Payload } from './generated-types'

const action: ActionDefinition<Settings, Payload> = {
title: 'Add to List',
description: 'Adds to list',
fields: {},
perform: (_request, _data) => {
// Make your partner api request here!
// return request('https://example.com', {
// method: 'post',
// json: data.payload
// })
}
}

export default action

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import type { AudienceDestinationDefinition } from '@segment/actions-core'
import type { Settings } from './generated-types'

import addToList from './addToList'

const destination: AudienceDestinationDefinition<Settings> = {
name: 'First Party Dv360',
slug: 'actions-first-party-dv360',
mode: 'cloud',

authentication: {
scheme: 'custom',
fields: {},
testAuthentication: (_request) => {
return { status: 'succeeded' }
}
},

audienceFields: {},

audienceConfig: {
mode: {
type: 'synced',
full_audience_sync: false
},

createAudience: async (_request, _createAudienceInput) => {
return { externalId: '' }
},

getAudience: async (_request, _getAudienceInput) => {
return { externalId: '' }
}
},

onDelete: async (_request, _) => {
// Return a request that performs a GDPR delete for the provided Segment userId or anonymousId
// provided in the payload. If your destination does not support GDPR deletion you should not
// implement this function and should remove it completely.
},

actions: {
addToList
}
}

export default destination
1 change: 1 addition & 0 deletions packages/destination-actions/src/destinations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ register('663235c8575a8ec65ccadf42', './magellan-ai')
register('664ce7bdc820c71f7e3ff031', './contentstack')
register('664ce847b3e6f19ea96b3611', './trubrics')
register('66684ba89c0523461d8bb7f3', './taboola-actions')
register('6683e1d5e37fd84efcf3bbef', './first-party-dv360')

function register(id: MetadataId, destinationPath: string) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down

0 comments on commit cb6b440

Please sign in to comment.