forked from segmentio/action-destinations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register First Party DV360 (segmentio#2125)
* 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
1 parent
76e2f52
commit cb6b440
Showing
5 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
packages/destination-actions/src/destinations/first-party-dv360/addToList/generated-types.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
packages/destination-actions/src/destinations/first-party-dv360/addToList/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
3 changes: 3 additions & 0 deletions
3
packages/destination-actions/src/destinations/first-party-dv360/generated-types.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
packages/destination-actions/src/destinations/first-party-dv360/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters